pub struct SkipList<T> { /* private fields */ }Implementations§
Source§impl<T: Ord> SkipList<T>
impl<T: Ord> SkipList<T>
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn locate<Q>(&self, key: &Q) -> Option<usize>
pub fn contains<Q>(&self, key: &Q) -> bool
pub fn insert(&mut self, value: T)where
T: Ord,
Sourcepub fn remove<Q>(&mut self, key: &Q) -> Option<T>
pub fn remove<Q>(&mut self, key: &Q) -> Option<T>
Removes and returns the value for a given key, if it exists in the list.
Sourcepub fn range<Q, R>(&self, range: R) -> RangeIter<'_, T, Q, R> ⓘ
pub fn range<Q, R>(&self, range: R) -> RangeIter<'_, T, Q, R> ⓘ
Returns an inclusive iterator over a range of values
in the list from start to end.
pub fn iter(&self) -> Iter<'_, T> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for SkipList<T>
impl<T> RefUnwindSafe for SkipList<T>where
T: RefUnwindSafe,
impl<T> Send for SkipList<T>where
T: Send,
impl<T> Sync for SkipList<T>where
T: Sync,
impl<T> Unpin for SkipList<T>where
T: Unpin,
impl<T> UnwindSafe for SkipList<T>where
T: UnwindSafe,
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