pub struct ExportedTree<'a>(/* private fields */);Implementations§
Source§impl<'a> ExportedTree<'a>
impl<'a> ExportedTree<'a>
pub fn to_bytes(&self) -> Result<Vec<u8>, MlsError>
pub fn byte_size(&self) -> usize
pub fn into_owned(self) -> ExportedTree<'static>
pub fn roster(&'a self) -> Roster<'a>
Sourcepub fn nodes(&self) -> &[Option<Node>]
pub fn nodes(&self) -> &[Option<Node>]
Returns a reference to the underlying vector of nodes in the tree.
Each element is None for a blank node, or Some(Node) for an
occupied leaf or parent node. Nodes are indexed by NodeIndex where
even indices are leaves and odd indices are parent nodes.
Sourcepub fn filtered_direct_path(
&self,
index: LeafIndex,
) -> Result<Vec<Option<&Parent>>, MlsError>
pub fn filtered_direct_path( &self, index: LeafIndex, ) -> Result<Vec<Option<&Parent>>, MlsError>
Returns the filtered direct path for a given leaf index as a vector
of Option<&Parent> nodes.
Per RFC 9420 Section 8.4, the filtered direct path removes all nodes
whose child on the copath has an empty resolution. Each entry is None
if the parent node at that position is blank, or Some(&Parent) if
it is populated.
Source§impl ExportedTree<'static>
impl ExportedTree<'static>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, MlsError>
Trait Implementations§
Source§impl<'a> Clone for ExportedTree<'a>
impl<'a> Clone for ExportedTree<'a>
Source§fn clone(&self) -> ExportedTree<'a>
fn clone(&self) -> ExportedTree<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ExportedTree<'a>
impl<'a> Debug for ExportedTree<'a>
Source§impl From<ExportedTree<'_>> for NodeVec
impl From<ExportedTree<'_>> for NodeVec
Source§fn from(value: ExportedTree<'_>) -> Self
fn from(value: ExportedTree<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> MlsDecode for ExportedTree<'a>
impl<'a> MlsDecode for ExportedTree<'a>
Source§impl<'a> MlsEncode for ExportedTree<'a>
impl<'a> MlsEncode for ExportedTree<'a>
Source§impl<'a> MlsSize for ExportedTree<'a>
impl<'a> MlsSize for ExportedTree<'a>
fn mls_encoded_len(&self) -> usize
Source§impl<'a> PartialEq for ExportedTree<'a>
impl<'a> PartialEq for ExportedTree<'a>
Source§fn eq(&self, other: &ExportedTree<'a>) -> bool
fn eq(&self, other: &ExportedTree<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for ExportedTree<'a>
Auto Trait Implementations§
impl<'a> Freeze for ExportedTree<'a>
impl<'a> RefUnwindSafe for ExportedTree<'a>
impl<'a> Send for ExportedTree<'a>
impl<'a> Sync for ExportedTree<'a>
impl<'a> Unpin for ExportedTree<'a>
impl<'a> UnsafeUnpin for ExportedTree<'a>
impl<'a> UnwindSafe for ExportedTree<'a>
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