pub struct Token<N: Node> { /* private fields */ }
Trait Implementations§
Source§impl<N: Node<Token = Self>> NodeToken<N> for Token<N>
impl<N: Node<Token = Self>> NodeToken<N> for Token<N>
Source§fn parent(
&self,
arena: &Arena<N::Base>,
) -> Option<<<N::Base as BaseNode>::Branch as Node>::Token>
fn parent( &self, arena: &Arena<N::Base>, ) -> Option<<<N::Base as BaseNode>::Branch as Node>::Token>
Source§fn ancestors<'arena>(
&self,
arena: &'arena Arena<N::Base>,
) -> Ancestors<'arena, N::Base> ⓘ
fn ancestors<'arena>( &self, arena: &'arena Arena<N::Base>, ) -> Ancestors<'arena, N::Base> ⓘ
Source§fn data_mut<'arena>(
&self,
arena: &'arena mut Arena<N::Base>,
) -> N::DataRefMut<'arena>where
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
fn data_mut<'arena>(
&self,
arena: &'arena mut Arena<N::Base>,
) -> N::DataRefMut<'arena>where
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
Source§fn prev(&self, arena: &Arena<N::Base>) -> Option<<N::Base as Node>::Token>where
N::Base: LinkedNode,
fn prev(&self, arena: &Arena<N::Base>) -> Option<<N::Base as Node>::Token>where
N::Base: LinkedNode,
Source§fn next(&self, arena: &Arena<N::Base>) -> Option<<N::Base as Node>::Token>where
N::Base: LinkedNode,
fn next(&self, arena: &Arena<N::Base>) -> Option<<N::Base as Node>::Token>where
N::Base: LinkedNode,
Source§fn preceding_siblings<'arena>(
&self,
arena: &'arena Arena<N::Base>,
) -> PrecedingSiblings<'arena, N> ⓘwhere
N::Base: LinkedNode,
fn preceding_siblings<'arena>(
&self,
arena: &'arena Arena<N::Base>,
) -> PrecedingSiblings<'arena, N> ⓘwhere
N::Base: LinkedNode,
Source§fn following_siblings<'arena>(
&self,
arena: &'arena Arena<N::Base>,
) -> FollowingSiblings<'arena, N> ⓘwhere
N::Base: LinkedNode,
fn following_siblings<'arena>(
&self,
arena: &'arena Arena<N::Base>,
) -> FollowingSiblings<'arena, N> ⓘwhere
N::Base: LinkedNode,
Source§fn first(&self, arena: &Arena<N::Base>) -> Option<<N::Base as Node>::Token>
fn first(&self, arena: &Arena<N::Base>) -> Option<<N::Base as Node>::Token>
Returns the token of this branch node’s first child. Read more
Source§fn last(&self, arena: &Arena<N::Base>) -> Option<<N::Base as Node>::Token>
fn last(&self, arena: &Arena<N::Base>) -> Option<<N::Base as Node>::Token>
Returns the token of this branch node’s last child. Read more
Source§fn children<'arena>(
&self,
arena: &'arena Arena<N::Base>,
) -> N::ChildrenIter<'arena>
fn children<'arena>( &self, arena: &'arena Arena<N::Base>, ) -> N::ChildrenIter<'arena>
Returns an iterator over the tokens of this branch node’s children.
Source§fn descendants<'arena>(
&self,
arena: &'arena Arena<N::Base>,
) -> Descendants<'arena, N> ⓘ
fn descendants<'arena>( &self, arena: &'arena Arena<N::Base>, ) -> Descendants<'arena, N> ⓘ
Returns an iterator over the tokens of this branch node’s descendants. Read more
Source§fn len(&self, arena: &Arena<N::Base>) -> usize
fn len(&self, arena: &Arena<N::Base>) -> usize
Available on crate feature
deque
only.Returns the number of children this branch node has.
Source§fn is_empty(&self, arena: &Arena<N::Base>) -> bool
fn is_empty(&self, arena: &Arena<N::Base>) -> bool
Returns whether this branch node has no children.
Source§fn get_unchecked(
&self,
arena: &Arena<N::Base>,
index: usize,
) -> <N::Base as Node>::Token
fn get_unchecked( &self, arena: &Arena<N::Base>, index: usize, ) -> <N::Base as Node>::Token
Available on crate feature
deque
only.Returns the token of the child at the given
index
. Read moreSource§fn get(
&self,
arena: &Arena<N::Base>,
index: usize,
) -> Option<<N::Base as Node>::Token>
fn get( &self, arena: &Arena<N::Base>, index: usize, ) -> Option<<N::Base as Node>::Token>
Available on crate feature
deque
only.Returns the token of the child at the given
index
. Read moreSource§fn detach_front(
&self,
arena: &mut Arena<N::Base>,
) -> Option<<N::Base as Node>::Token>where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
fn detach_front(
&self,
arena: &mut Arena<N::Base>,
) -> Option<<N::Base as Node>::Token>where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
Detaches this branch node’s first child, returning its token. Read more
Source§fn detach_back(
&self,
arena: &mut Arena<N::Base>,
) -> Option<<N::Base as Node>::Token>where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
fn detach_back(
&self,
arena: &mut Arena<N::Base>,
) -> Option<<N::Base as Node>::Token>where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
Detaches this branch node’s last child, returning its token. Read more
Source§fn pop_front(
&self,
arena: &mut Arena<N::Base>,
) -> Option<<N::Base as BaseNode>::Representation>where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
fn pop_front(
&self,
arena: &mut Arena<N::Base>,
) -> Option<<N::Base as BaseNode>::Representation>where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
Removes this branch node’s first child. Read more
Source§fn pop_back(
&self,
arena: &mut Arena<N::Base>,
) -> Option<<N::Base as BaseNode>::Representation>where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
fn pop_back(
&self,
arena: &mut Arena<N::Base>,
) -> Option<<N::Base as BaseNode>::Representation>where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
Removes this branch node’s last child. Read more
Source§fn push_front(&self, arena: &mut Arena<N::Base>, new: <N::Base as Node>::Token)where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
fn push_front(&self, arena: &mut Arena<N::Base>, new: <N::Base as Node>::Token)where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
Source§fn push_back(&self, arena: &mut Arena<N::Base>, new: <N::Base as Node>::Token)where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
fn push_back(&self, arena: &mut Arena<N::Base>, new: <N::Base as Node>::Token)where
N: BranchNode<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
Source§fn detach(
&self,
arena: &mut Arena<N::Base>,
index: usize,
) -> <N::Base as Node>::Tokenwhere
N: BranchNodeDeque<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
fn detach(
&self,
arena: &mut Arena<N::Base>,
index: usize,
) -> <N::Base as Node>::Tokenwhere
N: BranchNodeDeque<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
Available on crate feature
deque
only.Detaches the child at the given
index
, returning its token. Read moreSource§fn remove(
&self,
arena: &mut Arena<N::Base>,
index: usize,
) -> <N::Base as BaseNode>::Representationwhere
N: BranchNodeDeque<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
fn remove(
&self,
arena: &mut Arena<N::Base>,
index: usize,
) -> <N::Base as BaseNode>::Representationwhere
N: BranchNodeDeque<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
Available on crate feature
deque
only.Removes the child at the given
index
. Read moreSource§fn insert(
&self,
arena: &mut Arena<N::Base>,
index: usize,
new: <N::Base as Node>::Token,
)where
N: BranchNodeDeque<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
fn insert(
&self,
arena: &mut Arena<N::Base>,
index: usize,
new: <N::Base as Node>::Token,
)where
N: BranchNodeDeque<Token = Self>,
for<'base> &'base mut N: TryFrom<&'base mut N::Base>,
for<'base> <&'base mut N as TryFrom<&'base mut N::Base>>::Error: Debug,
Available on crate feature
deque
only.impl<N: Node> Copy for Token<N>
impl<N: Node> Eq for Token<N>
Auto Trait Implementations§
impl<N> Freeze for Token<N>
impl<N> RefUnwindSafe for Token<N>where
N: RefUnwindSafe,
impl<N> Send for Token<N>where
N: Send,
impl<N> Sync for Token<N>where
N: Sync,
impl<N> Unpin for Token<N>where
N: Unpin,
impl<N> UnwindSafe for Token<N>where
N: 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