core: add Metadata to Ingest

This commit is contained in:
Aode (lion) 2021-11-19 17:16:46 -06:00
parent 4bc6f27288
commit 0b9ccc4466
2 changed files with 14 additions and 0 deletions

13
apub-core/src/ingest.rs Normal file
View file

@ -0,0 +1,13 @@
use url::Url;
pub trait Ingest<'a, Activity, Metadata> {
type Error: std::error::Error;
type Future: std::future::Future<Output = Result<(), Self::Error>> + 'a;
fn ingest(
&'a self,
authority: Option<Url>,
activity: Activity,
metadata: Metadata,
) -> Self::Future;
}

View file

@ -1,6 +1,7 @@
pub mod deliver;
pub mod deref;
pub mod digest;
pub mod ingest;
pub mod object_id;
pub mod session;
pub mod signature;