Trait Resolve

Source
pub trait Resolve: Send + Sync {
    type HostId: Serialize + DeserializeOwned + Debug + Send + Sync;
    type ActorId: Serialize + DeserializeOwned + Debug + Send + Sync;
    type Claims: Serialize + DeserializeOwned + Send + Sync;

    // Required method
    fn resolve<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        host: &'life1 Self::HostId,
        actor_id: &'life2 Self::ActorId,
    ) -> Pin<Box<dyn Future<Output = Result<Actor<Self::ActorId>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided method
    fn verify<'life0, 'async_trait>(
        &'life0 self,
        encoded: String,
        now: SystemTime,
    ) -> Pin<Box<dyn Future<Output = Result<SignedToken<Self::HostId, Self::ActorId, Self::Claims>, Error>> + Send + 'async_trait>>
       where Self::ActorId: PartialEq,
             Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Trait which defines how to fetch an Actor given its host and ID

Required Associated Types§

Required Methods§

Source

fn resolve<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, host: &'life1 Self::HostId, actor_id: &'life2 Self::ActorId, ) -> Pin<Box<dyn Future<Output = Result<Actor<Self::ActorId>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Given a host and actor ID, return a corresponding Actor.

Provided Methods§

Source

fn verify<'life0, 'async_trait>( &'life0 self, encoded: String, now: SystemTime, ) -> Pin<Box<dyn Future<Output = Result<SignedToken<Self::HostId, Self::ActorId, Self::Claims>, Error>> + Send + 'async_trait>>
where Self::ActorId: PartialEq, Self: 'async_trait, 'life0: 'async_trait,

Decode and verify the given encoded token.

Implementors§