pub trait ClientKeyStore: Send + Sync {
// Required methods
fn register<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
actor_kind: ActorKind,
actor_id: &'life1 str,
public_key: &'life2 [u8],
label: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<ClientPublicKey>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ClientPublicKey>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_by_actor<'life0, 'life1, 'async_trait>(
&'life0 self,
actor_kind: ActorKind,
actor_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ClientPublicKey>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn revoke<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn touch_last_used<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Storage trait for SDK / browser client public keys.
Required Methods§
Sourcefn register<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
actor_kind: ActorKind,
actor_id: &'life1 str,
public_key: &'life2 [u8],
label: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<ClientPublicKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn register<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
actor_kind: ActorKind,
actor_id: &'life1 str,
public_key: &'life2 [u8],
label: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<ClientPublicKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Registers a new public key for actor_kind / actor_id.
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ClientPublicKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ClientPublicKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Looks up a key by its key_id. Returns the row regardless of
whether it has been revoked.
Sourcefn list_by_actor<'life0, 'life1, 'async_trait>(
&'life0 self,
actor_kind: ActorKind,
actor_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ClientPublicKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_by_actor<'life0, 'life1, 'async_trait>(
&'life0 self,
actor_kind: ActorKind,
actor_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ClientPublicKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Lists all active (non-revoked) keys for an actor, newest first.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".