struct Tree {
simples: Vec<Simple>,
complex: Vec<Full>,
keys: Vec<CompressedKey>,
}
Expand description
One tree node for at most each code. To avoid using too much memory we keep nodes with few successors in optimized form. This form doesn’t offer lookup by indexing but instead does a linear search.
Fields§
§simples: Vec<Simple>
§complex: Vec<Full>
§keys: Vec<CompressedKey>
Implementations§
source§impl Tree
impl Tree
fn init(&mut self, min_size: u8)
fn reset(&mut self, min_size: u8)
fn at_key(&self, code: u16, ch: u8) -> Option<u16>
sourcefn iterate(&mut self, code: u16, ch: u8) -> Result<u16, u16>
fn iterate(&mut self, code: u16, ch: u8) -> Result<u16, u16>
Iterate to the next char. Return Ok when it was already in the tree or creates a new entry for it and returns Err.
fn append(&mut self, code: u16, ch: u8) -> u16
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tree
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnwindSafe for Tree
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more