Skip to main content

IdentityBackend

Trait IdentityBackend 

Source
pub trait IdentityBackend: Send + Sync {
    // Required methods
    fn store(&self, identity: &ActorIdentity) -> Result<(), IdentityError>;
    fn load(&self, actor_id: &str) -> Result<ActorIdentity, IdentityError>;
    fn delete(&self, actor_id: &str) -> Result<(), IdentityError>;
    fn list(&self) -> Result<Vec<String>, IdentityError>;
}
Expand description

Backend trait for persistent identity storage.

Required Methods§

Source

fn store(&self, identity: &ActorIdentity) -> Result<(), IdentityError>

Store an identity.

Source

fn load(&self, actor_id: &str) -> Result<ActorIdentity, IdentityError>

Look up an identity by ID.

Source

fn delete(&self, actor_id: &str) -> Result<(), IdentityError>

Delete an identity.

Source

fn list(&self) -> Result<Vec<String>, IdentityError>

List all actor IDs.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§