pub struct SortedSet<T> { /* private fields */ }
Implementations§
Source§impl<T: Ord> SortedSet<T>
impl<T: Ord> SortedSet<T>
pub fn new() -> Self
pub fn with_capacity(size: usize) -> Self
pub fn from_vec(v: Vec<T>) -> Self
pub fn from_vec_unchecked(v: Vec<T>) -> Self
pub fn into_vec(self) -> Vec<T>
pub fn capacity(&self) -> usize
pub fn reserve(&mut self, additional: usize)
pub fn shrink_to_fit(&mut self)
pub fn iter(&self) -> Iter<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
pub fn into_iter(self) -> IntoIter<T>
pub fn first(&self) -> Option<&T>
pub fn last(&self) -> Option<&T>
pub fn binary_search(&self, x: &T) -> Result<usize, usize>
pub fn contains(&self, x: &T) -> bool
pub fn insert(&mut self, x: T) -> bool
pub fn remove(&mut self, x: &T) -> bool
pub fn remove_at(&mut self, idx: usize) -> T
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for SortedSet<T>
impl<T> RefUnwindSafe for SortedSet<T>where
T: RefUnwindSafe,
impl<T> Send for SortedSet<T>where
T: Send,
impl<T> Sync for SortedSet<T>where
T: Sync,
impl<T> Unpin for SortedSet<T>where
T: Unpin,
impl<T> UnwindSafe for SortedSet<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