pub struct SafeAad { /* private fields */ }Available on (32-bit or 64-bit) and crate feature
extensions-draft-08 only.Expand description
A Safe AAD struct as it appears at the beginning of an MLS message’s
authenticated_data field when negotiated for the group.
Implementations§
Source§impl SafeAad
impl SafeAad
Sourcepub fn from_items(items: Vec<SafeAadItem>) -> Result<Self, SafeAadError>
pub fn from_items(items: Vec<SafeAadItem>) -> Result<Self, SafeAadError>
Build a SafeAad from a list of items.
Returns an error if items are not sorted in strictly-increasing
ComponentId order or if any ComponentId appears more than once.
Sourcepub fn items(&self) -> &[SafeAadItem]
pub fn items(&self) -> &[SafeAadItem]
Returns all items.
Sourcepub fn get(&self, component_id: ComponentId) -> Option<&[u8]>
pub fn get(&self, component_id: ComponentId) -> Option<&[u8]>
Look up the data carried for a given ComponentId.
Returns None if there is no item tagged with that id.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SafeAad
impl<'de> Deserialize<'de> for SafeAad
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 Deserialize for SafeAad
impl Deserialize for SafeAad
Source§fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
Available on crate feature
std only.This function deserializes the
bytes from the provided a std::io::Read
and returns the populated struct. Read moreSource§impl DeserializeBytes for SafeAad
impl DeserializeBytes for SafeAad
Source§impl Serialize for &SafeAad
impl Serialize for &SafeAad
Source§impl Serialize for SafeAad
impl Serialize for SafeAad
impl Eq for SafeAad
impl StructuralPartialEq for SafeAad
Auto Trait Implementations§
impl Freeze for SafeAad
impl RefUnwindSafe for SafeAad
impl Send for SafeAad
impl Sync for SafeAad
impl Unpin for SafeAad
impl UnsafeUnpin for SafeAad
impl UnwindSafe for SafeAad
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
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
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