[−][src]Struct avl::AvlTreeSet
A sorted set implemented with a nearly balanced binary search tree.
Implementations
impl<T: Ord> Set<T>
[src]
pub fn new() -> Self
[src]
Creates an empty set. No memory is allocated until the first item is inserted.
impl<T: Ord> Set<T>
[src]
pub fn get(&self, value: &T) -> Option<&T>
[src]
Returns a reference to the value in the set that is equal to the given value.
pub fn insert(&mut self, value: T) -> bool
[src]
Inserts a value into the set.
pub fn remove(&mut self, value: &T) -> bool
[src]
Removes a value from the set. Returns whether the value was previously in the set.
pub fn take(&mut self, value: &T) -> Option<T>
[src]
Removes a value from the set. Returns the value if it was previously in the set.
impl<T> Set<T>
[src]
pub fn is_empty(&self) -> bool
[src]
Returns true if the set contains no elements.
pub fn len(&self) -> usize
[src]
Returns the number of elements in the set.
pub fn clear(&mut self)
[src]
Clears the set, deallocating all memory.
pub fn iter<'a>(&'a self) -> Iter<'a, T>
[src]
Gets an iterator over the values of the map in sorted order.
Trait Implementations
impl<T: Debug> Debug for Set<T>
[src]
impl<T: Ord> Default for Set<T>
[src]
impl<'a, T> IntoIterator for &'a Set<T>
[src]
type Item = &'a T
The type of the elements being iterated over.
type IntoIter = Iter<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<T> IntoIterator for Set<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Set<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> !Send for Set<T>
impl<T> !Sync for Set<T>
impl<T> Unpin for Set<T>
impl<T> UnwindSafe for Set<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,