pub trait AuthStorageBackend: Send + Sync {
// Required methods
fn read(&self) -> AuthResult<Option<String>>;
fn write(&self, data: &str) -> AuthResult<()>;
fn delete(&self) -> AuthResult<()>;
}Expand description
Storage backend trait
Required Methods§
Sourcefn read(&self) -> AuthResult<Option<String>>
fn read(&self) -> AuthResult<Option<String>>
Read stored data
Sourcefn write(&self, data: &str) -> AuthResult<()>
fn write(&self, data: &str) -> AuthResult<()>
Write data
Sourcefn delete(&self) -> AuthResult<()>
fn delete(&self) -> AuthResult<()>
Delete stored data
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".