[−][src]Struct tinyset::setusize::SetUsize
A set for usize elements.
Methods
impl SetUsize
[src]
pub fn new() -> Self
[src]
Creates an empty set..
pub fn with_capacity(_cap: usize) -> Self
[src]
Creates an empty set with the specified capacity.
pub fn insert(&mut self, elem: usize) -> bool
[src]
Adds a value to the set.
If the set did not have this value present, true
is returned.
If the set did have this value present, false
is returned.
pub fn len(&self) -> usize
[src]
Returns the number of elements in the set.
pub fn contains(&self, value: usize) -> bool
[src]
Returns true if the set contains a value.
pub fn remove(&mut self, value: usize) -> bool
[src]
Removes an element, and returns true if that element was present.
pub fn iter<'a>(&'a self) -> impl Iterator<Item = usize> + 'a
[src]
Iterate
pub fn drain<'a>(&'a mut self) -> impl Iterator<Item = usize> + 'a
[src]
Drain
Trait Implementations
impl Clone for SetUsize
[src]
impl Default for SetUsize
[src]
impl FromIterator<usize> for SetUsize
[src]
fn from_iter<I: IntoIterator<Item = usize>>(iter: I) -> Self
[src]
impl IntoIterator for SetUsize
[src]
Auto Trait Implementations
impl RefUnwindSafe for SetUsize
impl !Send for SetUsize
impl !Sync for SetUsize
impl Unpin for SetUsize
impl UnwindSafe for SetUsize
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[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>,