pub struct Tree { /* private fields */ }
Expand description
A binary search tree which maps cardinal values to ordinal values
Implementations§
source§impl Tree
impl Tree
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Construct a new Tree
with the given capacity
.
sourcepub fn insert(&mut self, ordinal: usize) -> bool
pub fn insert(&mut self, ordinal: usize) -> bool
Insert an ordinal
into this Tree
and return false
if it was already present.
Panics:
if ordinal >= self.max_size()
Trait Implementations§
Auto Trait Implementations§
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