pub struct KeyPackage { /* private fields */ }
Expand description
The key package struct.
Implementations§
Source§impl KeyPackage
impl KeyPackage
Sourcepub fn builder() -> KeyPackageBuilder
pub fn builder() -> KeyPackageBuilder
Create a key package builder.
This is provided for convenience. You can also use KeyPackageBuilder::new
.
Sourcepub fn extensions(&self) -> &Extensions
pub fn extensions(&self) -> &Extensions
Get a reference to the extensions of this key package.
Sourcepub fn check_extension_support(
&self,
required_extensions: &[ExtensionType],
) -> Result<(), KeyPackageExtensionSupportError>
pub fn check_extension_support( &self, required_extensions: &[ExtensionType], ) -> Result<(), KeyPackageExtensionSupportError>
Check whether the this key package supports all the required extensions in the provided list.
Sourcepub fn hash_ref(
&self,
crypto: &impl OpenMlsCrypto,
) -> Result<KeyPackageRef, LibraryError>
pub fn hash_ref( &self, crypto: &impl OpenMlsCrypto, ) -> Result<KeyPackageRef, LibraryError>
Compute the KeyPackageRef
of this KeyPackage
.
The KeyPackageRef
is used to identify a new member that should get
added to a group.
Sourcepub fn ciphersuite(&self) -> Ciphersuite
pub fn ciphersuite(&self) -> Ciphersuite
Get the Ciphersuite
.
Sourcepub fn hpke_init_key(&self) -> &InitKey
pub fn hpke_init_key(&self) -> &InitKey
Get the public HPKE init key of this key package.
Sourcepub fn last_resort(&self) -> bool
pub fn last_resort(&self) -> bool
Check if this KeyPackage is a last resort key package.
Trait Implementations§
Source§impl Clone for KeyPackage
impl Clone for KeyPackage
Source§fn clone(&self) -> KeyPackage
fn clone(&self) -> KeyPackage
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 KeyPackage
impl Debug for KeyPackage
Source§impl<'de> Deserialize<'de> for KeyPackage
impl<'de> Deserialize<'de> for KeyPackage
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
Source§impl From<KeyPackage> for KeyPackageIn
impl From<KeyPackage> for KeyPackageIn
Source§fn from(value: KeyPackage) -> Self
fn from(value: KeyPackage) -> Self
Converts to this type from the input type.
Source§impl From<KeyPackage> for LeafNode
impl From<KeyPackage> for LeafNode
Source§fn from(key_package: KeyPackage) -> Self
fn from(key_package: KeyPackage) -> Self
Converts to this type from the input type.
Source§impl From<KeyPackage> for MlsMessageOut
impl From<KeyPackage> for MlsMessageOut
Source§fn from(key_package: KeyPackage) -> Self
fn from(key_package: KeyPackage) -> Self
Converts to this type from the input type.
Source§impl PartialEq for KeyPackage
impl PartialEq for KeyPackage
Source§impl Serialize for &KeyPackage
impl Serialize for &KeyPackage
Source§impl Serialize for KeyPackage
impl Serialize for KeyPackage
Source§impl Serialize for KeyPackage
impl Serialize for KeyPackage
Source§impl Size for &KeyPackage
impl Size for &KeyPackage
fn tls_serialized_len(&self) -> usize
Source§impl Size for KeyPackage
impl Size for KeyPackage
fn tls_serialized_len(&self) -> usize
impl VerifiedStruct for KeyPackage
Auto Trait Implementations§
impl Freeze for KeyPackage
impl RefUnwindSafe for KeyPackage
impl Send for KeyPackage
impl Sync for KeyPackage
impl Unpin for KeyPackage
impl UnwindSafe for KeyPackage
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