pub struct KeyPackageBuilder { /* private fields */ }
Expand description
Builder that helps creating (and configuring) a KeyPackage
.
Implementations§
Source§impl KeyPackageBuilder
impl KeyPackageBuilder
Sourcepub fn key_package_lifetime(self, lifetime: Lifetime) -> Self
pub fn key_package_lifetime(self, lifetime: Lifetime) -> Self
Set the key package lifetime.
Sourcepub fn key_package_extensions(self, extensions: Extensions) -> Self
pub fn key_package_extensions(self, extensions: Extensions) -> Self
Set the key package extensions.
Sourcepub fn mark_as_last_resort(self) -> Self
pub fn mark_as_last_resort(self) -> Self
Mark the key package as a last-resort key package via a LastResortExtension
.
Sourcepub fn leaf_node_capabilities(self, capabilities: Capabilities) -> Self
pub fn leaf_node_capabilities(self, capabilities: Capabilities) -> Self
Set the leaf node capabilities.
Sourcepub fn leaf_node_extensions(self, extensions: Extensions) -> Self
pub fn leaf_node_extensions(self, extensions: Extensions) -> Self
Set the leaf node extensions.
Sourcepub fn build(
self,
ciphersuite: Ciphersuite,
provider: &impl OpenMlsProvider,
signer: &impl Signer,
credential_with_key: CredentialWithKey,
) -> Result<KeyPackageBundle, KeyPackageNewError>
pub fn build( self, ciphersuite: Ciphersuite, provider: &impl OpenMlsProvider, signer: &impl Signer, credential_with_key: CredentialWithKey, ) -> Result<KeyPackageBundle, KeyPackageNewError>
Finalize and build the key package.
Trait Implementations§
Source§impl Clone for KeyPackageBuilder
impl Clone for KeyPackageBuilder
Source§fn clone(&self) -> KeyPackageBuilder
fn clone(&self) -> KeyPackageBuilder
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 Debug for KeyPackageBuilder
impl Debug for KeyPackageBuilder
Source§impl Default for KeyPackageBuilder
impl Default for KeyPackageBuilder
Source§fn default() -> KeyPackageBuilder
fn default() -> KeyPackageBuilder
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for KeyPackageBuilder
impl<'de> Deserialize<'de> for KeyPackageBuilder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for KeyPackageBuilder
impl RefUnwindSafe for KeyPackageBuilder
impl Send for KeyPackageBuilder
impl Sync for KeyPackageBuilder
impl Unpin for KeyPackageBuilder
impl UnwindSafe for KeyPackageBuilder
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§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