pub trait IKeyExprTreeNodeMut<Weight>: IKeyExprTreeNode<Weight> {
// Required methods
fn parent_mut(&mut self) -> Option<&mut Self::Parent>;
fn weight_mut(&mut self) -> Option<&mut Weight>;
fn take_weight(&mut self) -> Option<Weight>;
fn insert_weight(&mut self, weight: Weight) -> Option<Weight>;
fn children_mut(&mut self) -> &mut Self::Children;
}
Expand description
The mutating methods of a KeTree node.
Required Methods§
Sourcefn parent_mut(&mut self) -> Option<&mut Self::Parent>
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).
Sourcefn weight_mut(&mut self) -> Option<&mut Weight>
fn weight_mut(&mut self) -> Option<&mut Weight>
Mutably access the node’s weight.
Sourcefn take_weight(&mut self) -> Option<Weight>
fn take_weight(&mut self) -> Option<Weight>
Remove the node’s weight.
Sourcefn insert_weight(&mut self, weight: Weight) -> Option<Weight>
fn insert_weight(&mut self, weight: Weight) -> Option<Weight>
Assign a weight to the node, returning the previous weight if the node had one.
Sourcefn children_mut(&mut self) -> &mut Self::Children
fn children_mut(&mut self) -> &mut Self::Children
Mutably access the node’s children.