pub struct LeafNode { /* private fields */ }
Expand description
This struct implements the MLS leaf node.
// draft-ietf-mls-protocol-17
struct {
HPKEPublicKey encryption_key;
SignaturePublicKey signature_key;
Credential credential;
Capabilities capabilities;
LeafNodeSource leaf_node_source;
select (LeafNode.leaf_node_source) {
case key_package:
Lifetime lifetime;
case update:
struct{};
case commit:
opaque parent_hash<V>;
};
Extension extensions<V>;
/* SignWithLabel(., "LeafNodeTBS", LeafNodeTBS) */
opaque signature<V>;
} LeafNode;
Implementations§
Source§impl LeafNode
impl LeafNode
Sourcepub fn encryption_key(&self) -> &EncryptionKey
pub fn encryption_key(&self) -> &EncryptionKey
Returns the encryption_key
.
Sourcepub fn signature_key(&self) -> &SignaturePublicKey
pub fn signature_key(&self) -> &SignaturePublicKey
Returns the signature_key
as byte slice.
Sourcepub fn credential(&self) -> &Credential
pub fn credential(&self) -> &Credential
Returns the signature_key
as byte slice.
Sourcepub fn parent_hash(&self) -> Option<&[u8]>
pub fn parent_hash(&self) -> Option<&[u8]>
Returns the parent_hash
as byte slice or None
.
Sourcepub fn capabilities(&self) -> &Capabilities
pub fn capabilities(&self) -> &Capabilities
Return a reference to Capabilities
.
Sourcepub fn leaf_node_source(&self) -> &LeafNodeSource
pub fn leaf_node_source(&self) -> &LeafNodeSource
Return a reference to the leaf node source.
Sourcepub fn extensions(&self) -> &Extensions
pub fn extensions(&self) -> &Extensions
Return a reference to the leaf node extensions.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LeafNode
impl<'de> Deserialize<'de> for LeafNode
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<&LeafNode> for CredentialWithKey
impl From<&LeafNode> for CredentialWithKey
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<KeyPackageBundle> for LeafNode
impl From<KeyPackageBundle> for LeafNode
Source§fn from(key_package: KeyPackageBundle) -> Self
fn from(key_package: KeyPackageBundle) -> Self
Converts to this type from the input type.
impl Entity<CURRENT_VERSION> for LeafNode
impl Eq for LeafNode
impl LeafNode<CURRENT_VERSION> for LeafNode
impl StructuralPartialEq for LeafNode
impl VerifiedStruct for LeafNode
Auto Trait Implementations§
impl Freeze for LeafNode
impl RefUnwindSafe for LeafNode
impl Send for LeafNode
impl Sync for LeafNode
impl Unpin for LeafNode
impl UnwindSafe for LeafNode
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