pub struct Branch<BranchData: Debug, LeafData: Debug> { /* private fields */ }
Available on crate feature
split
only.Expand description
The node representing branches in a split node tree.
Branches are nodes which may have children, as opposed to leaves, which may not have children.
BranchData
represents the custom data associated with branch nodes.
Trait Implementations§
Source§impl<BranchData, LeafData> BranchNode for Branch<BranchData, LeafData>
impl<BranchData, LeafData> BranchNode for Branch<BranchData, LeafData>
Source§type ChildrenIter<'branch> = ChildrenLinked<'branch, Branch<BranchData, LeafData>>
where
Self: 'branch
type ChildrenIter<'branch> = ChildrenLinked<'branch, Branch<BranchData, LeafData>> where Self: 'branch
The iterator returned by
children
.Source§fn children<'branch>(
&'branch self,
arena: &'branch Arena<Self::Base>,
) -> Self::ChildrenIter<'branch>
fn children<'branch>( &'branch self, arena: &'branch Arena<Self::Base>, ) -> Self::ChildrenIter<'branch>
Returns an iterator over the tokens of this branch node’s children.
Source§fn detach_front(
token: Self::Token,
arena: &mut Arena<Self::Base>,
) -> Option<<Self::Base as Node>::Token>
fn detach_front( token: Self::Token, arena: &mut Arena<Self::Base>, ) -> Option<<Self::Base as Node>::Token>
Source§fn detach_back(
token: Self::Token,
arena: &mut Arena<Self::Base>,
) -> Option<<Self::Base as Node>::Token>
fn detach_back( token: Self::Token, arena: &mut Arena<Self::Base>, ) -> Option<<Self::Base as Node>::Token>
Source§fn pop_front(
token: Self::Token,
arena: &mut Arena<Self::Base>,
) -> Option<<Self::Base as BaseNode>::Representation>
fn pop_front( token: Self::Token, arena: &mut Arena<Self::Base>, ) -> Option<<Self::Base as BaseNode>::Representation>
Removes this branch node’s first child. Read more
Source§fn pop_back(
token: Self::Token,
arena: &mut Arena<Self::Base>,
) -> Option<<Self::Base as BaseNode>::Representation>
fn pop_back( token: Self::Token, arena: &mut Arena<Self::Base>, ) -> Option<<Self::Base as BaseNode>::Representation>
Removes this branch node’s last child. Read more
Source§fn push_front(
token: Self::Token,
arena: &mut Arena<Self::Base>,
new: <Self::Base as Node>::Token,
)
fn push_front( token: Self::Token, arena: &mut Arena<Self::Base>, new: <Self::Base as Node>::Token, )
Source§impl<BranchData: Debug + Debug, LeafData: Debug + Debug> Debug for Branch<BranchData, LeafData>
impl<BranchData: Debug + Debug, LeafData: Debug + Debug> Debug for Branch<BranchData, LeafData>
Source§impl<BranchData, LeafData> LinkedNode for Branch<BranchData, LeafData>
impl<BranchData, LeafData> LinkedNode for Branch<BranchData, LeafData>
Source§fn preceding_siblings<'node>(
&'node self,
arena: &'node Arena<Self::Base>,
) -> PrecedingSiblings<'node, Self> ⓘwhere
Self: Sized,
fn preceding_siblings<'node>(
&'node self,
arena: &'node Arena<Self::Base>,
) -> PrecedingSiblings<'node, Self> ⓘwhere
Self: Sized,
Source§fn following_siblings<'node>(
&'node self,
arena: &'node Arena<Self::Base>,
) -> FollowingSiblings<'node, Self> ⓘwhere
Self: Sized,
fn following_siblings<'node>(
&'node self,
arena: &'node Arena<Self::Base>,
) -> FollowingSiblings<'node, Self> ⓘwhere
Self: Sized,
Source§impl<BranchData, LeafData> Node for Branch<BranchData, LeafData>
impl<BranchData, LeafData> Node for Branch<BranchData, LeafData>
Source§type DataRef<'data> = &'data BranchData
where
Self: 'data
type DataRef<'data> = &'data BranchData where Self: 'data
Source§type DataRefMut<'data> = &'data mut BranchData
where
Self: 'data
type DataRefMut<'data> = &'data mut BranchData where Self: 'data
Source§fn data(&self) -> &BranchData
fn data(&self) -> &BranchData
Returns a reference to the data associated with this node.
Source§fn data_mut(&mut self) -> &mut BranchData
fn data_mut(&mut self) -> &mut BranchData
Returns a mutable reference to the data associated with this node.
Source§impl<'node, BranchData, LeafData> TryFrom<&'node SplitNode<BranchData, LeafData>> for &'node Branch<BranchData, LeafData>
impl<'node, BranchData, LeafData> TryFrom<&'node SplitNode<BranchData, LeafData>> for &'node Branch<BranchData, LeafData>
Source§impl<'node, BranchData, LeafData> TryFrom<&'node mut SplitNode<BranchData, LeafData>> for &'node mut Branch<BranchData, LeafData>
impl<'node, BranchData, LeafData> TryFrom<&'node mut SplitNode<BranchData, LeafData>> for &'node mut Branch<BranchData, LeafData>
impl<BranchData, LeafData> Eq for Branch<BranchData, LeafData>
Auto Trait Implementations§
impl<BranchData, LeafData> Freeze for Branch<BranchData, LeafData>where
BranchData: Freeze,
impl<BranchData, LeafData> RefUnwindSafe for Branch<BranchData, LeafData>where
BranchData: RefUnwindSafe,
LeafData: RefUnwindSafe,
impl<BranchData, LeafData> Send for Branch<BranchData, LeafData>
impl<BranchData, LeafData> Sync for Branch<BranchData, LeafData>
impl<BranchData, LeafData> Unpin for Branch<BranchData, LeafData>
impl<BranchData, LeafData> UnwindSafe for Branch<BranchData, LeafData>where
BranchData: UnwindSafe,
LeafData: UnwindSafe,
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