Skip to main content

PrefixOps

Trait PrefixOps 

Source
pub trait PrefixOps: PrefixReadOps {
    // Required methods
    fn insert_prefix(
        &mut self,
        idx: BaseIndex,
        value: Self::T,
    ) -> Option<Self::T>;
    fn remove_prefix(&mut self, idx: BaseIndex) -> Option<Self::T>;
    fn get_prefix_exact_mut(&mut self, idx: BaseIndex) -> Option<&mut Self::T>;
}
Expand description

Trie node operations for accessing and mutating prefixes.

Required Methods§

Source

fn insert_prefix(&mut self, idx: BaseIndex, value: Self::T) -> Option<Self::T>

Insert a value at the given base index.

Source

fn remove_prefix(&mut self, idx: BaseIndex) -> Option<Self::T>

Remove the value for the given base index.

Source

fn get_prefix_exact_mut(&mut self, idx: BaseIndex) -> Option<&mut Self::T>

Get a mutable reference to the prefix value that matches the given index exactly.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T> PrefixOps for &mut T
where T: PrefixOps + ?Sized,

Source§

fn insert_prefix(&mut self, idx: BaseIndex, value: Self::T) -> Option<Self::T>

Source§

fn remove_prefix(&mut self, idx: BaseIndex) -> Option<Self::T>

Source§

fn get_prefix_exact_mut(&mut self, idx: BaseIndex) -> Option<&mut Self::T>

Implementors§

Source§

impl<T, C> PrefixOps for Node<T, C>
where T: 'static, C: Storage + ?Sized,