[][src]Struct tinyset::vecset::VecSet

pub struct VecSet<T> { /* fields omitted */ }

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]

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]

Removes an element, and returns true if that element was present.

Important traits for Iter<'a, T>
pub fn iter(&self) -> Iter<T>[src]

Returns an iterator over the set.

Trait Implementations

impl<T: Clone> Clone for 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

impl<T> Send for VecSet<T> where
    T: Send

impl<T> Sync for VecSet<T> where
    T: Sync

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]