SessionStorage

Trait SessionStorage 

Source
pub trait SessionStorage: Send + Sync {
    // Required methods
    fn is_trusted_identity(
        &self,
        address: &str,
        identity_key: &[u8],
    ) -> impl Future<Output = bool> + Send;
    fn load_session(
        &self,
        address: &str,
    ) -> impl Future<Output = Option<SessionRecord>> + Send;
    fn store_session(
        &self,
        address: &str,
        record: SessionRecord,
    ) -> impl Future<Output = ()> + Send;
    fn load_pre_key(
        &self,
        pre_key_id: u32,
    ) -> impl Future<Output = Option<KeyPair>> + Send;
    fn load_signed_pre_key(
        &self,
        signed_pre_key_id: u32,
    ) -> impl Future<Output = Option<KeyPair>> + Send;
    fn get_our_identity(&self) -> impl Future<Output = KeyPair> + Send;
}

Required Methods§

Source

fn is_trusted_identity( &self, address: &str, identity_key: &[u8], ) -> impl Future<Output = bool> + Send

Source

fn load_session( &self, address: &str, ) -> impl Future<Output = Option<SessionRecord>> + Send

Source

fn store_session( &self, address: &str, record: SessionRecord, ) -> impl Future<Output = ()> + Send

Source

fn load_pre_key( &self, pre_key_id: u32, ) -> impl Future<Output = Option<KeyPair>> + Send

Source

fn load_signed_pre_key( &self, signed_pre_key_id: u32, ) -> impl Future<Output = Option<KeyPair>> + Send

Source

fn get_our_identity(&self) -> impl Future<Output = KeyPair> + Send

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§