pub trait ITokenKeyExprTreeNode<'a, Weight, Token> {
type Tokenized: IKeyExprTreeNode<Weight>;
type TokenizedMut: IKeyExprTreeNodeMut<Weight>;
// Required methods
fn tokenize(&'a self, token: &'a Token) -> Self::Tokenized;
fn tokenize_mut(&'a self, token: &'a mut Token) -> Self::TokenizedMut;
}
Expand description
Nodes from a token-locked tree need a token to obtain read/write permissions.
This trait allows tokenizing a node, allowing to use IKeyExprTreeNode
and IKeyExprTreeNodeMut
’s methods on it.
Required Associated Types§
type Tokenized: IKeyExprTreeNode<Weight>
type TokenizedMut: IKeyExprTreeNodeMut<Weight>
Required Methods§
Sourcefn tokenize(&'a self, token: &'a Token) -> Self::Tokenized
fn tokenize(&'a self, token: &'a Token) -> Self::Tokenized
Wrap the node with the an immutable reference to the token to allow immutable access to its contents.
Sourcefn tokenize_mut(&'a self, token: &'a mut Token) -> Self::TokenizedMut
fn tokenize_mut(&'a self, token: &'a mut Token) -> Self::TokenizedMut
Wrap the node with a mutable reference to the token to allow mutable access to its contents