Struct libsignal_protocol::SessionRecord
source · pub struct SessionRecord { /* private fields */ }
Implementations§
source§impl SessionRecord
impl SessionRecord
pub fn new_fresh() -> Self
pub fn deserialize(bytes: &[u8]) -> Result<Self, SignalProtocolError>
pub fn archive_current_state(&mut self) -> Result<(), SignalProtocolError>
pub fn serialize(&self) -> Result<Vec<u8>, SignalProtocolError>
pub fn remote_registration_id(&self) -> Result<u32, SignalProtocolError>
pub fn local_registration_id(&self) -> Result<u32, SignalProtocolError>
pub fn session_version(&self) -> Result<u32, SignalProtocolError>
pub fn local_identity_key_bytes(&self) -> Result<Vec<u8>, SignalProtocolError>
pub fn remote_identity_key_bytes( &self, ) -> Result<Option<Vec<u8>>, SignalProtocolError>
pub fn has_usable_sender_chain( &self, now: SystemTime, ) -> Result<bool, SignalProtocolError>
pub fn alice_base_key(&self) -> Result<&[u8], SignalProtocolError>
pub fn get_receiver_chain_key_bytes( &self, sender: &PublicKey, ) -> Result<Option<Box<[u8]>>, SignalProtocolError>
pub fn get_sender_chain_key_bytes(&self) -> Result<Vec<u8>, SignalProtocolError>
pub fn current_ratchet_key_matches( &self, key: &PublicKey, ) -> Result<bool, SignalProtocolError>
pub fn get_kyber_ciphertext( &self, ) -> Result<Option<&Vec<u8>>, SignalProtocolError>
Trait Implementations§
source§impl Clone for SessionRecord
impl Clone for SessionRecord
source§fn clone(&self) -> SessionRecord
fn clone(&self) -> SessionRecord
Returns a copy 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 SessionRecord
impl RefUnwindSafe for SessionRecord
impl Send for SessionRecord
impl Sync for SessionRecord
impl Unpin for SessionRecord
impl UnwindSafe for SessionRecord
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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