pub struct OrderStatisticTree<T> { /* private fields */ }
Implementations§
Source§impl<T> OrderStatisticTree<T>
impl<T> OrderStatisticTree<T>
pub fn new(compare: fn(&T, &T) -> Ordering) -> Self
pub fn with_capacity(capacity: usize, compare: fn(&T, &T) -> Ordering) -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn unique_len(&self) -> usize
pub fn clear(&mut self)
pub fn get(&self, idx: usize) -> Option<&T>
pub fn insert(&mut self, value: T)
pub fn remove(&mut self, value: &T) -> Option<T>
pub fn contains(&self, value: &T) -> bool
pub fn rank_range(&self, bound: &T) -> Result<RangeInclusive<usize>, usize>
pub fn rank_unique(&self, value: &T) -> Result<usize, usize>
pub fn count(&self, value: &T) -> usize
Trait Implementations§
Source§impl<T: Debug> Debug for OrderStatisticTree<T>
impl<T: Debug> Debug for OrderStatisticTree<T>
Source§impl<T> Extend<T> for OrderStatisticTree<T>
impl<T> Extend<T> for OrderStatisticTree<T>
Source§fn extend<I: IntoIterator<Item = T>>(&mut self, iterable: I)
fn extend<I: IntoIterator<Item = T>>(&mut self, iterable: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl<T> Freeze for OrderStatisticTree<T>
impl<T> RefUnwindSafe for OrderStatisticTree<T>where
T: RefUnwindSafe,
impl<T> Send for OrderStatisticTree<T>
impl<T> Sync for OrderStatisticTree<T>
impl<T> Unpin for OrderStatisticTree<T>where
T: Unpin,
impl<T> UnwindSafe for OrderStatisticTree<T>where
T: RefUnwindSafe + 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more