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 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<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 PartialEq<LeafNode> for LeafNode
impl PartialEq<LeafNode> for LeafNode
source§impl Serialize for &LeafNode
impl Serialize for &LeafNode
source§impl Serialize for LeafNode
impl Serialize for LeafNode
impl Eq for LeafNode
impl StructuralEq for LeafNode
impl StructuralPartialEq for LeafNode
Auto Trait Implementations§
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