ActorExt

Trait ActorExt 

Source
pub trait ActorExt: Actor {
    type PublicKeyId: Dereference + From<Url>;

    // Required method
    fn public_key(&self) -> Option<Out<Self::PublicKeyId>>;

    // Provided method
    fn dereference_public_key<'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::PublicKeyId>>, I::Error>> + 'async_trait>>
       where I::Error: From<R::Error>,
             I::ActorId: From<Url> + 'static,
             I: 'async_trait + Ingest<Out<Self::PublicKeyId>>,
             R: 'async_trait + Repo,
             S: 'async_trait + Session,
             Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

An extension of Actor that is aware of the PublicKey type

Required Associated Types§

Source

type PublicKeyId: Dereference + From<Url>

The Public Key ID for dereferencing a Public key

Required Methods§

Source

fn public_key(&self) -> Option<Out<Self::PublicKeyId>>

Attempt to pull the public key off the actor

Provided Methods§

Source

fn dereference_public_key<'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::PublicKeyId>>, I::Error>> + 'async_trait>>
where I::Error: From<R::Error>, I::ActorId: From<Url> + 'static, I: 'async_trait + Ingest<Out<Self::PublicKeyId>>, R: 'async_trait + Repo, S: 'async_trait + Session, Self: 'async_trait, 'life0: 'async_trait,

Pull the public key off the acctor, 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.

Implementors§