pub struct Dict {
pub nodes: Vec<DictNode>,
}Expand description
A sorted doubly-linked list dictionary. The comparison function takes (frame_data, key1, key2) and returns key1 <= key2.
Fields§
§nodes: Vec<DictNode>Implementations§
Source§impl Dict
impl Dict
pub fn new() -> Self
Sourcepub fn insert<F>(&mut self, key: u32, leq: &F) -> NodeIdx
pub fn insert<F>(&mut self, key: u32, leq: &F) -> NodeIdx
dictInsert: insert a key at the back (before the head sentinel).
Sourcepub fn insert_before<F>(&mut self, node: NodeIdx, key: u32, leq: &F) -> NodeIdx
pub fn insert_before<F>(&mut self, node: NodeIdx, key: u32, leq: &F) -> NodeIdx
dictInsertBefore: insert key before node, walking backward to find the
correct sorted position.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dict
impl RefUnwindSafe for Dict
impl Send for Dict
impl Sync for Dict
impl Unpin for Dict
impl UnsafeUnpin for Dict
impl UnwindSafe for Dict
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