pub trait ActivityExt: Activity {
type ActorId: Dereference + From<Url>;
type ObjectId: Dereference + From<Url>;
// Required methods
fn actor(&self) -> Option<Out<Self::ActorId>>;
fn object(&self) -> Option<Out<Self::ObjectId>>;
// Provided methods
fn dereference_actor<'life0, 'async_trait, I, R, S>(
&'life0 self,
actor_id: I::ActorId,
ingest: I,
remote_repo: R,
session: S,
) -> Pin<Box<dyn Future<Output = Result<Option<Out<Self::ActorId>>, I::Error>> + 'async_trait>>
where I::Error: From<R::Error>,
I::ActorId: From<Url> + 'static,
I: 'async_trait + Ingest<Out<Self::ActorId>>,
R: 'async_trait + Repo,
S: 'async_trait + Session,
Self: 'async_trait,
'life0: 'async_trait { ... }
fn dereference_object<'life0, 'async_trait, I, R, S>(
&'life0 self,
actor_id: I::ActorId,
ingest: I,
remote_repo: R,
session: S,
) -> Pin<Box<dyn Future<Output = Result<Option<Out<Self::ObjectId>>, I::Error>> + 'async_trait>>
where I::Error: From<R::Error>,
I::ActorId: From<Url> + 'static,
I: 'async_trait + Ingest<Out<Self::ObjectId>>,
R: 'async_trait + Repo,
S: 'async_trait + Session,
Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
An extension of Activity that is aware of it’s Actor and Object types
Required Associated Types§
Sourcetype ActorId: Dereference + From<Url>
type ActorId: Dereference + From<Url>
The Actor ID type for dereferencing an Actor
Sourcetype ObjectId: Dereference + From<Url>
type ObjectId: Dereference + From<Url>
The Object ID type for dereferencing an Object
Required Methods§
Provided Methods§
Sourcefn dereference_actor<'life0, 'async_trait, I, R, S>(
&'life0 self,
actor_id: I::ActorId,
ingest: I,
remote_repo: R,
session: S,
) -> Pin<Box<dyn Future<Output = Result<Option<Out<Self::ActorId>>, I::Error>> + 'async_trait>>
fn dereference_actor<'life0, 'async_trait, I, R, S>( &'life0 self, actor_id: I::ActorId, ingest: I, remote_repo: R, session: S, ) -> Pin<Box<dyn Future<Output = Result<Option<Out<Self::ActorId>>, I::Error>> + 'async_trait>>
Pull the actor off the activity, or fetch it from a repo if it isn’t present
Sourcefn dereference_object<'life0, 'async_trait, I, R, S>(
&'life0 self,
actor_id: I::ActorId,
ingest: I,
remote_repo: R,
session: S,
) -> Pin<Box<dyn Future<Output = Result<Option<Out<Self::ObjectId>>, I::Error>> + 'async_trait>>
fn dereference_object<'life0, 'async_trait, I, R, S>( &'life0 self, actor_id: I::ActorId, ingest: I, remote_repo: R, session: S, ) -> Pin<Box<dyn Future<Output = Result<Option<Out<Self::ObjectId>>, I::Error>> + 'async_trait>>
Pull the object off the activity, or fetch it from a repo if it isn’t present
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.