Struct priority_container::stable::max::StablePrioContainerMax
source · [−]pub struct StablePrioContainerMax<T> { /* private fields */ }
Expand description
A stable priority container max. This means equal elements are returned in inserted order
Implementations
sourceimpl<T: Ord> StablePrioContainerMax<T>
impl<T: Ord> StablePrioContainerMax<T>
sourcepub fn new(capacity: usize) -> Self
pub fn new(capacity: usize) -> Self
Creates a new StablePrioContainer with given max items. This value must not be smaller than 1
Panics
Panics if capacity
is 0
sourcepub fn new_allocated(capacity: usize, alloc_size: usize) -> Self
pub fn new_allocated(capacity: usize, alloc_size: usize) -> Self
Create a new StablePrioContainer with given preallocated size. capacity
must not be smaller than 1
Panics
Panics if capacity
is 0
pub fn contains(&self, item: &T) -> bool
sourcepub fn into_sorted_vec(self) -> Vec<T>
pub fn into_sorted_vec(self) -> Vec<T>
Return a sorted vec of the prio container
sourceimpl<T> StablePrioContainerMax<T>
impl<T> StablePrioContainerMax<T>
Trait Implementations
sourceimpl<T: Ord> Extend<T> for StablePrioContainerMax<T>
impl<T: Ord> Extend<T> for StablePrioContainerMax<T>
sourcefn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
sourcefn 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.
sourcefn 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
sourceimpl<T: Ord> IntoIterator for StablePrioContainerMax<T>
impl<T: Ord> IntoIterator for StablePrioContainerMax<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for StablePrioContainerMax<T> where
T: RefUnwindSafe,
impl<T> Send for StablePrioContainerMax<T> where
T: Send,
impl<T> Sync for StablePrioContainerMax<T> where
T: Sync,
impl<T> Unpin for StablePrioContainerMax<T> where
T: Unpin,
impl<T> UnwindSafe for StablePrioContainerMax<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more