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 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 modify<F>(self, modify: F) -> Result<Self>where
F: FnOnce(&mut PreKeyBundleContent),
Trait Implementations§
Source§impl Clone for PreKeyBundle
impl Clone for PreKeyBundle
Source§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
Source§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 UnsafeUnpin 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