pub struct PreKeyBundleBuilder { /* private fields */ }
Expand description
A builder type for the PreKeyBundle
.
Implementations§
Source§impl PreKeyBundleBuilder
impl PreKeyBundleBuilder
Sourcepub fn pre_key(self, id: u32, public_key: &PublicKey) -> Self
pub fn pre_key(self, id: u32, public_key: &PublicKey) -> Self
Set the recipient’s public pre-key.
Sourcepub fn signed_pre_key(self, id: u32, signed_public_key: &PublicKey) -> Self
pub fn signed_pre_key(self, id: u32, signed_public_key: &PublicKey) -> Self
Set the signed pre-key.
Sourcepub fn registration_id(self, id: u32) -> Self
pub fn registration_id(self, id: u32) -> Self
Set the registration ID.
Sourcepub fn identity_key(self, identity_key: &PublicKey) -> Self
pub fn identity_key(self, identity_key: &PublicKey) -> Self
Set the user’s identity key.
Sourcepub fn build(self) -> Result<PreKeyBundle, Error>
pub fn build(self) -> Result<PreKeyBundle, Error>
Actually build the PreKeyBundle
.
Trait Implementations§
Source§impl Debug for PreKeyBundleBuilder
impl Debug for PreKeyBundleBuilder
Source§impl Default for PreKeyBundleBuilder
impl Default for PreKeyBundleBuilder
Source§fn default() -> PreKeyBundleBuilder
fn default() -> PreKeyBundleBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PreKeyBundleBuilder
impl RefUnwindSafe for PreKeyBundleBuilder
impl !Send for PreKeyBundleBuilder
impl !Sync for PreKeyBundleBuilder
impl Unpin for PreKeyBundleBuilder
impl UnwindSafe for PreKeyBundleBuilder
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