QueryIdentityCache

Trait QueryIdentityCache 

Source
pub trait QueryIdentityCache {
    // Required methods
    fn fetch_cached_inbox_ids<T>(
        &self,
        identifiers: &[T],
    ) -> Result<HashMap<String, String>, StorageError>
       where T: Display,
             for<'a> &'a T: Into<StoredIdentityKind>;
    fn cache_inbox_id<T, S>(
        &self,
        identifier: &T,
        inbox_id: S,
    ) -> Result<(), StorageError>
       where T: Display,
             S: ToString,
             for<'a> &'a T: Into<StoredIdentityKind>;
}

Required Methods§

Source

fn fetch_cached_inbox_ids<T>( &self, identifiers: &[T], ) -> Result<HashMap<String, String>, StorageError>
where T: Display, for<'a> &'a T: Into<StoredIdentityKind>,

Returns a HashMap of WalletAddress -> InboxId

Source

fn cache_inbox_id<T, S>( &self, identifier: &T, inbox_id: S, ) -> Result<(), StorageError>
where T: Display, S: ToString, for<'a> &'a T: Into<StoredIdentityKind>,

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.

Implementations on Foreign Types§

Source§

impl<G> QueryIdentityCache for &G

Source§

fn fetch_cached_inbox_ids<T>( &self, identifiers: &[T], ) -> Result<HashMap<String, String>, StorageError>
where T: Display, for<'a> &'a T: Into<StoredIdentityKind>,

Source§

fn cache_inbox_id<T, S>( &self, identifier: &T, inbox_id: S, ) -> Result<(), StorageError>
where T: Display, S: ToString, for<'a> &'a T: Into<StoredIdentityKind>,

Implementors§