pub struct SledKnownMailboxesStore {
tree: Tree,
encryption: Option<StorageEncryption>,
}Expand description
A KnownMailboxesStore implementation using sled for storage.
Fields§
§tree: Tree§encryption: Option<StorageEncryption>Implementations§
Source§impl SledKnownMailboxesStore
impl SledKnownMailboxesStore
Sourcefn serialize_mailbox(&self, mailbox: &KnownMailbox) -> Result<Vec<u8>>
fn serialize_mailbox(&self, mailbox: &KnownMailbox) -> Result<Vec<u8>>
Serializes a KnownMailbox and optionally encrypts it.
Sourcefn deserialize_mailbox(&self, data: &[u8]) -> Result<KnownMailbox>
fn deserialize_mailbox(&self, data: &[u8]) -> Result<KnownMailbox>
Deserializes a KnownMailbox and optionally decrypts it.
Trait Implementations§
Source§impl KnownMailboxesStore for SledKnownMailboxesStore
impl KnownMailboxesStore for SledKnownMailboxesStore
Source§fn add_mailbox<'life0, 'async_trait>(
&'life0 self,
mailbox: KnownMailbox,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_mailbox<'life0, 'async_trait>(
&'life0 self,
mailbox: KnownMailbox,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Adds a new
KnownMailbox to the store.Source§fn get_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
peer_id: &'life1 PeerId,
) -> Pin<Box<dyn Future<Output = Result<Option<KnownMailbox>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
peer_id: &'life1 PeerId,
) -> Pin<Box<dyn Future<Output = Result<Option<KnownMailbox>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieves a
KnownMailbox by its PeerId.Source§fn list_mailboxes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnownMailbox>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_mailboxes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnownMailbox>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists all known mailboxes.
Source§fn remove_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
peer_id: &'life1 PeerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
peer_id: &'life1 PeerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Removes a
KnownMailbox from the store.Auto Trait Implementations§
impl Freeze for SledKnownMailboxesStore
impl !RefUnwindSafe for SledKnownMailboxesStore
impl Send for SledKnownMailboxesStore
impl Sync for SledKnownMailboxesStore
impl Unpin for SledKnownMailboxesStore
impl !UnwindSafe for SledKnownMailboxesStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more