#[repr(u8)]pub enum TreeNode {
LeafNode(LeafNode),
ParentNode(ParentNode),
}
Variants§
LeafNode(LeafNode)
ParentNode(ParentNode)
Implementations§
Source§impl TreeNode
impl TreeNode
pub fn as_leaf_node(&self) -> Option<&LeafNode>
pub fn as_leaf_node_mut(&mut self) -> Option<&mut LeafNode>
pub fn as_parent_node(&self) -> Option<&ParentNode>
pub fn as_parent_node_mut(&mut self) -> Option<&mut ParentNode>
Trait Implementations§
Source§impl Deserialize for TreeNode
impl Deserialize for TreeNode
Source§fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
This function deserializes the
bytes
from the provided a std::io::Read
and returns the populated struct. Read moreSource§impl From<ParentNode> for TreeNode
impl From<ParentNode> for TreeNode
Source§fn from(value: ParentNode) -> Self
fn from(value: ParentNode) -> Self
Converts to this type from the input type.
impl Eq for TreeNode
impl StructuralPartialEq for TreeNode
Auto Trait Implementations§
impl Freeze for TreeNode
impl RefUnwindSafe for TreeNode
impl Send for TreeNode
impl Sync for TreeNode
impl Unpin for TreeNode
impl UnwindSafe for TreeNode
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