[−][src]Struct tinyset::vecset::VecSet
A set that is stored in a Vec
Methods
impl<T: Eq> VecSet<T>
[src]
pub fn new() -> VecSet<T>
[src]
Creates an empty set..
pub fn default() -> VecSet<T>
[src]
Creates an empty set..
pub fn len(&self) -> usize
[src]
Returns the number of elements in the set.
pub fn insert(&mut self, elem: T) -> 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 contains<Q: ?Sized>(&self, value: &Q) -> bool where
T: Borrow<Q>,
Q: Hash + Eq,
[src]
T: Borrow<Q>,
Q: Hash + Eq,
Returns true if the set contains a value.
pub fn remove<Q: ?Sized>(&mut self, value: &Q) -> bool where
T: Borrow<Q>,
Q: Hash + Eq,
[src]
T: Borrow<Q>,
Q: Hash + Eq,
Removes an element, and returns true if that element was present.
ⓘImportant traits for Iter<'a, T>pub fn iter(&self) -> Iter<T>
[src]
ⓘImportant traits for Iter<'a, T>
Returns an iterator over the set.
Trait Implementations
impl<T: Clone> Clone for VecSet<T>
[src]
fn clone(&self) -> VecSet<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for VecSet<T>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,