KeArcTreeNode

Struct KeArcTreeNode 

Source
pub struct KeArcTreeNode<Weight, Parent: IArcProvider, Wildness: IWildness, Children: IChildrenProvider<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>, Token: TokenTrait> { /* private fields */ }

Implementations§

Source§

impl<Weight, Wildness: IWildness, Children: IChildrenProvider<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>, Token: TokenTrait> KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>
where Children::Assoc: IChildren<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>,

Source

pub fn is_zombie(&self) -> bool

Under specific circumstances, a node that’s been cloned from a tree might have a destroyed parent. Such a node is “zombified”, and becomes unable to perform certain operations such as navigating its parents, which may be necessary for operations such as IKeyExprTreeNode::keyexpr.

To become zombified, a node and its parents must both have been pruned from the tree that constructed them, while at least one of the parents has also been dropped everywhere it was aliased through Arc.

Trait Implementations§

Source§

impl<Weight, Parent: IArcProvider, Wildness: IWildness, Children: IChildrenProvider<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>, Token: TokenTrait> HasChunk for KeArcTreeNode<Weight, Parent, Wildness, Children, Token>

Source§

fn chunk(&self) -> &keyexpr

Source§

impl<Weight, Parent: IArcProvider, Wildness: IWildness, Children: IChildrenProvider<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>, Token: TokenTrait> IKeyExprTreeNode<Weight> for KeArcTreeNode<Weight, Parent, Wildness, Children, Token>
where Children::Assoc: IChildren<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>,

Source§

fn parent(&self) -> Option<&Self::Parent>

Access the parent node if it exists (the node isn’t the first chunk of a key-expression).
Source§

fn keyexpr(&self) -> OwnedKeyExpr

Compute this node’s full key expression. Read more
Source§

fn weight(&self) -> Option<&Weight>

Access the node’s weight (or value). Read more
Source§

fn children(&self) -> &Self::Children

Access a node’s children.
Source§

impl<Weight, Parent: IArcProvider, Wildness: IWildness, Children: IChildrenProvider<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>, Token: TokenTrait> IKeyExprTreeNodeMut<Weight> for KeArcTreeNode<Weight, Parent, Wildness, Children, Token>
where Children::Assoc: IChildren<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>,

Source§

fn parent_mut(&mut self) -> Option<&mut Self::Parent>

Mutably access the parent node if it exists (the node isn’t the first chunk of a key-expression).
Source§

fn weight_mut(&mut self) -> Option<&mut Weight>

Mutably access the node’s weight.
Source§

fn take_weight(&mut self) -> Option<Weight>

Remove the node’s weight.
Source§

fn insert_weight(&mut self, weight: Weight) -> Option<Weight>

Assign a weight to the node, returning the previous weight if the node had one.
Source§

fn children_mut(&mut self) -> &mut Self::Children

Mutably access the node’s children.

Auto Trait Implementations§

§

impl<Weight, Parent, Wildness, Children, Token> Freeze for KeArcTreeNode<Weight, Parent, Wildness, Children, Token>
where <Children as IChildrenProvider<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>>::Assoc: Freeze, <Parent as IArcProvider>::Ptr<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>: Freeze, Weight: Freeze,

§

impl<Weight, Parent, Wildness, Children, Token> RefUnwindSafe for KeArcTreeNode<Weight, Parent, Wildness, Children, Token>
where <Children as IChildrenProvider<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>>::Assoc: RefUnwindSafe, <Parent as IArcProvider>::Ptr<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>: RefUnwindSafe, Weight: RefUnwindSafe,

§

impl<Weight, Parent, Wildness, Children, Token> Send for KeArcTreeNode<Weight, Parent, Wildness, Children, Token>
where <Children as IChildrenProvider<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>>::Assoc: Send, <Parent as IArcProvider>::Ptr<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>: Send, Weight: Send,

§

impl<Weight, Parent, Wildness, Children, Token> Sync for KeArcTreeNode<Weight, Parent, Wildness, Children, Token>
where <Children as IChildrenProvider<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>>::Assoc: Sync, <Parent as IArcProvider>::Ptr<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>: Sync, Weight: Sync,

§

impl<Weight, Parent, Wildness, Children, Token> Unpin for KeArcTreeNode<Weight, Parent, Wildness, Children, Token>
where <Children as IChildrenProvider<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>>::Assoc: Unpin, <Parent as IArcProvider>::Ptr<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>: Unpin, Weight: Unpin,

§

impl<Weight, Parent, Wildness, Children, Token> UnwindSafe for KeArcTreeNode<Weight, Parent, Wildness, Children, Token>
where <Children as IChildrenProvider<Arc<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>>>::Assoc: UnwindSafe, <Parent as IArcProvider>::Ptr<TokenCell<KeArcTreeNode<Weight, Weak<()>, Wildness, Children, Token>, Token>>: UnwindSafe, Weight: 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> AsNode<T> for T

Source§

fn as_node(&self) -> &T

Source§

impl<T> AsNodeMut<T> for T

Source§

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

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

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

Source§

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>,

Source§

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.