Struct mls_rs::KeyPackage
source · #[non_exhaustive]pub struct KeyPackage {
pub version: ProtocolVersion,
pub cipher_suite: CipherSuite,
pub hpke_init_key: HpkePublicKey,
pub extensions: ExtensionList,
pub signature: Vec<u8>,
/* private fields */
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.version: ProtocolVersion
§cipher_suite: CipherSuite
§hpke_init_key: HpkePublicKey
§extensions: ExtensionList
§signature: Vec<u8>
Implementations§
source§impl KeyPackage
impl KeyPackage
pub fn grease<P: CipherSuiteProvider>(&mut self, cs: &P) -> Result<(), MlsError>
pub fn ungreased_extensions(&self) -> ExtensionList
source§impl KeyPackage
impl KeyPackage
pub fn signing_identity(&self) -> &SigningIdentity
pub fn to_reference<CP: CipherSuiteProvider>( &self, cipher_suite_provider: &CP, ) -> Result<KeyPackageRef, MlsError>
pub fn expiration(&self) -> Result<u64, MlsError>
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 From<KeyPackage> for AddProposal
impl From<KeyPackage> for AddProposal
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 ExternalReceivedMessage
Available on crate feature external_client
only.
impl From<KeyPackage> for ExternalReceivedMessage
Available on crate feature
external_client
only.source§fn from(value: KeyPackage) -> Self
fn from(value: KeyPackage) -> Self
Converts to this type from the input type.
source§impl From<KeyPackage> for ReceivedMessage
impl From<KeyPackage> for ReceivedMessage
source§fn from(value: KeyPackage) -> Self
fn from(value: KeyPackage) -> Self
Converts to this type from the input type.
source§impl MlsDecode for KeyPackage
impl MlsDecode for KeyPackage
source§impl MlsEncode for KeyPackage
impl MlsEncode for KeyPackage
source§impl MlsSize for KeyPackage
impl MlsSize for KeyPackage
fn mls_encoded_len(&self) -> usize
source§impl PartialEq for KeyPackage
impl PartialEq for KeyPackage
impl StructuralPartialEq 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
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