pub trait Resolve: Send + Sync {
type HostId: Serialize + DeserializeOwned + PartialEq + Debug + Send + Sync;
type ActorId: Serialize + DeserializeOwned + PartialEq + 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: 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Trait which defines how to fetch an Actor
given its host and ID
Required Associated Types§
type HostId: Serialize + DeserializeOwned + PartialEq + Debug + Send + Sync
type ActorId: Serialize + DeserializeOwned + PartialEq + Debug + Send + Sync
type Claims: Serialize + DeserializeOwned + Send + Sync
Required Methods§
sourcefn 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,
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§
sourcefn 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: 'async_trait,
'life0: 'async_trait,
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: 'async_trait,
'life0: 'async_trait,
Decode and verify the given encoded
token.
Object Safety§
This trait is not object safe.