Struct libsignal_protocol::PreKeyBundle
source · pub struct PreKeyBundle { /* private fields */ }
Implementations§
source§impl PreKeyBundle
impl PreKeyBundle
pub fn new( registration_id: u32, device_id: DeviceId, pre_key: Option<(PreKeyId, PublicKey)>, signed_pre_key_id: SignedPreKeyId, signed_pre_key_public: PublicKey, signed_pre_key_signature: Vec<u8>, identity_key: IdentityKey, ) -> Result<Self>
pub fn with_kyber_pre_key( self, pre_key_id: KyberPreKeyId, public_key: PublicKey, signature: Vec<u8>, ) -> Self
pub fn registration_id(&self) -> Result<u32>
pub fn device_id(&self) -> Result<DeviceId>
pub fn pre_key_id(&self) -> Result<Option<PreKeyId>>
pub fn pre_key_public(&self) -> Result<Option<PublicKey>>
pub fn signed_pre_key_id(&self) -> Result<SignedPreKeyId>
pub fn signed_pre_key_public(&self) -> Result<PublicKey>
pub fn signed_pre_key_signature(&self) -> Result<&[u8]>
pub fn identity_key(&self) -> Result<&IdentityKey>
pub fn has_kyber_pre_key(&self) -> bool
pub fn kyber_pre_key_id(&self) -> Result<Option<KyberPreKeyId>>
pub fn kyber_pre_key_public(&self) -> Result<Option<&PublicKey>>
pub fn kyber_pre_key_signature(&self) -> Result<Option<&[u8]>>
pub fn modify<F>(self, modify: F) -> Result<Self>where
F: FnOnce(&mut PreKeyBundleContent),
Trait Implementations§
source§impl Clone for PreKeyBundle
impl Clone for PreKeyBundle
source§fn clone(&self) -> PreKeyBundle
fn clone(&self) -> PreKeyBundle
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 moresource§impl From<PreKeyBundle> for PreKeyBundleContent
impl From<PreKeyBundle> for PreKeyBundleContent
source§fn from(bundle: PreKeyBundle) -> Self
fn from(bundle: PreKeyBundle) -> Self
Converts to this type from the input type.
source§impl TryFrom<PreKeyBundleContent> for PreKeyBundle
impl TryFrom<PreKeyBundleContent> for PreKeyBundle
§type Error = SignalProtocolError
type Error = SignalProtocolError
The type returned in the event of a conversion error.
source§fn try_from(content: PreKeyBundleContent) -> Result<Self>
fn try_from(content: PreKeyBundleContent) -> Result<Self>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for PreKeyBundle
impl RefUnwindSafe for PreKeyBundle
impl Send for PreKeyBundle
impl Sync for PreKeyBundle
impl Unpin for PreKeyBundle
impl UnwindSafe for PreKeyBundle
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