pub enum SplitNodeDeque<BranchData: Debug, LeafData: Debug> {
    Branch(BranchDeque<BranchData, LeafData>),
    Leaf(LeafDeque<BranchData, LeafData>),
}
Available on crate features deque and split only.

Variants§

§

Branch(BranchDeque<BranchData, LeafData>)

§

Leaf(LeafDeque<BranchData, LeafData>)

Trait Implementations§

source§

impl<BranchData, LeafData> BaseNode for SplitNodeDeque<BranchData, LeafData>
where BranchData: Debug, LeafData: Debug,

§

type Representation = SplitNodeRepresentation<BranchData, LeafData>

The representation of the node after it is removed from the arena. Read more
§

type Branch = BranchDeque<BranchData, LeafData>

The type used for branch nodes. Read more
§

type Leaf = LeafDeque<BranchData, LeafData>

The type used for leaf nodes. Read more
source§

fn into_representation(self, arena: &mut Arena<Self>) -> Self::Representation
where Self: Sized,

Converts this node into its representation. Read more
source§

impl<BranchData: Debug + Debug, LeafData: Debug + Debug> Debug for SplitNodeDeque<BranchData, LeafData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<BranchData, LeafData> Node for SplitNodeDeque<BranchData, LeafData>
where BranchData: Debug, LeafData: Debug,

§

type Base = SplitNodeDeque<BranchData, LeafData>

The ‘base node’ used in the arena. Read more
§

type Token = SplitTokenDeque<BranchData, LeafData>

The token associated with this type of node.
§

type Data = SplitData<BranchData, LeafData>

The custom data associated with this node.
§

type DataRef<'data> = SplitData<&'data BranchData, &'data LeafData> where Self: 'data

A type acting as a reference to the node’s data. Read more
§

type DataRefMut<'data> = SplitData<&'data mut BranchData, &'data mut LeafData> where Self: 'data

A type acting as a mutable reference to the node’s data. Read more
source§

fn new(arena: &mut Arena<Self>, data: Self::Data) -> Self::Token

Creates a new node allocated in the given arena using the given data. Read more
source§

fn token(&self) -> Self::Token

Returns this node’s token.
source§

fn parent(&self) -> Option<<<Self::Base as BaseNode>::Branch as Node>::Token>

Returns the token of this node’s parent. Read more
source§

fn data(&self) -> Self::DataRef<'_>

Returns a reference to the data associated with this node.
source§

fn data_mut(&mut self) -> Self::DataRefMut<'_>

Returns a mutable reference to the data associated with this node.
source§

fn ancestors<'node>( &'node self, arena: &'node Arena<Self::Base> ) -> Ancestors<'node, Self::Base>
where Self: Sized,

Returns an iterator over the tokens of this node’s ancestors. Read more
source§

fn root<'node>(&'node self, arena: &'node Arena<Self::Base>) -> RootToken<Self>
where Self: Sized,

Returns this node’s root node. Read more
source§

impl<BranchData, LeafData> NodeToken<SplitNodeDeque<BranchData, LeafData>> for SplitTokenDeque<BranchData, LeafData>
where BranchData: Debug, LeafData: Debug,

source§

fn parent( &self, arena: &Arena<N::Base> ) -> Option<<<N::Base as BaseNode>::Branch as Node>::Token>

Returns this node’s parent’s token. Read more
source§

fn ancestors<'arena>( &self, arena: &'arena Arena<N::Base> ) -> Ancestors<'arena, N::Base>

Returns an iterator over the tokens of this node’s ancestors. Read more
source§

impl<'node, BranchData, LeafData> TryFrom<&'node SplitNodeDeque<BranchData, LeafData>> for &'node BranchDeque<BranchData, LeafData>
where BranchData: Debug, LeafData: Debug,

§

type Error = &'node SplitNodeDeque<BranchData, LeafData>

The type returned in the event of a conversion error.
source§

fn try_from( node: &'node SplitNodeDeque<BranchData, LeafData> ) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'node, BranchData, LeafData> TryFrom<&'node SplitNodeDeque<BranchData, LeafData>> for &'node LeafDeque<BranchData, LeafData>
where BranchData: Debug, LeafData: Debug,

§

type Error = &'node SplitNodeDeque<BranchData, LeafData>

The type returned in the event of a conversion error.
source§

fn try_from( node: &'node SplitNodeDeque<BranchData, LeafData> ) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'node, BranchData, LeafData> TryFrom<&'node mut SplitNodeDeque<BranchData, LeafData>> for &'node mut BranchDeque<BranchData, LeafData>
where BranchData: Debug, LeafData: Debug,

§

type Error = &'node mut SplitNodeDeque<BranchData, LeafData>

The type returned in the event of a conversion error.
source§

fn try_from( node: &'node mut SplitNodeDeque<BranchData, LeafData> ) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'node, BranchData, LeafData> TryFrom<&'node mut SplitNodeDeque<BranchData, LeafData>> for &'node mut LeafDeque<BranchData, LeafData>
where BranchData: Debug, LeafData: Debug,

§

type Error = &'node mut SplitNodeDeque<BranchData, LeafData>

The type returned in the event of a conversion error.
source§

fn try_from( node: &'node mut SplitNodeDeque<BranchData, LeafData> ) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<BranchData, LeafData> RefUnwindSafe for SplitNodeDeque<BranchData, LeafData>
where BranchData: RefUnwindSafe, LeafData: RefUnwindSafe,

§

impl<BranchData, LeafData> Send for SplitNodeDeque<BranchData, LeafData>
where BranchData: Send, LeafData: Send,

§

impl<BranchData, LeafData> Sync for SplitNodeDeque<BranchData, LeafData>
where BranchData: Sync, LeafData: Sync,

§

impl<BranchData, LeafData> Unpin for SplitNodeDeque<BranchData, LeafData>
where BranchData: Unpin, LeafData: Unpin,

§

impl<BranchData, LeafData> UnwindSafe for SplitNodeDeque<BranchData, LeafData>
where BranchData: UnwindSafe, LeafData: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.