ic_auth_client::storage

Trait AuthClientStorage

Source
pub trait AuthClientStorage {
    // Required methods
    fn get<T: AsRef<str>>(
        &mut self,
        key: T,
    ) -> impl Future<Output = Option<StoredKey>>;
    fn set<S: AsRef<str>, T: AsRef<str>>(
        &mut self,
        key: S,
        value: T,
    ) -> impl Future<Output = ()>;
    fn remove<T: AsRef<str>>(&mut self, key: T) -> impl Future<Output = ()>;
}
Expand description

Trait for persisting user authentication data.

Required Methods§

Source

fn get<T: AsRef<str>>( &mut self, key: T, ) -> impl Future<Output = Option<StoredKey>>

Source

fn set<S: AsRef<str>, T: AsRef<str>>( &mut self, key: S, value: T, ) -> impl Future<Output = ()>

Source

fn remove<T: AsRef<str>>(&mut self, key: T) -> impl Future<Output = ()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§