Skip to main content

ITokenKeyExprTreeNode

Trait ITokenKeyExprTreeNode 

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

Required Methods§

Source

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.

Source

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, T: 'a, Weight, Token: 'a> ITokenKeyExprTreeNode<'a, Weight, Token> for T