pub struct StoreContext(/* private fields */);
Expand description
Something which contains state used by the signal protocol.
Under the hood this contains several “Stores” for various keys and session state (e.g. which identities are trusted, and their pre-keys).
Implementations§
Source§impl StoreContext
impl StoreContext
Sourcepub fn registration_id(&self) -> Result<u32, Error>
pub fn registration_id(&self) -> Result<u32, Error>
Get the registration ID.
Sourcepub fn contains_session(&self, addr: &Address) -> Result<bool, Error>
pub fn contains_session(&self, addr: &Address) -> Result<bool, Error>
Does this store already contain a session with the provided recipient?
Sourcepub fn load_session(&self, addr: &Address) -> Result<SessionRecord, Error>
pub fn load_session(&self, addr: &Address) -> Result<SessionRecord, Error>
Load the session corresponding to the provided recipient.
Trait Implementations§
Source§impl Clone for StoreContext
impl Clone for StoreContext
Source§fn clone(&self) -> StoreContext
fn clone(&self) -> StoreContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for StoreContext
impl RefUnwindSafe for StoreContext
impl !Send for StoreContext
impl !Sync for StoreContext
impl Unpin for StoreContext
impl UnwindSafe for StoreContext
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