[−][src]Struct toolshed::set::Set
A set of values. This structure is using a Map
with value
type set to ()
internally.
Methods
impl<'arena, I> Set<'arena, I>
[src]
pub const fn new() -> Self
[src]
Creates a new, empty Set
.
ⓘImportant traits for SetIter<'arena, I>pub fn iter(&self) -> SetIter<'arena, I>
[src]
Get an iterator over the elements in the set
pub fn is_empty(&self) -> bool
[src]
Returns true
if the set contains no elements.
pub fn clear(&self)
[src]
Clears the map.
impl<'arena, I> Set<'arena, I> where
I: Eq + Hash + Copy,
[src]
I: Eq + Hash + Copy,
pub fn insert(&self, arena: &'arena Arena, item: I)
[src]
Inserts a value into the set.
pub fn get(&self, key: I) -> Option<&I>
[src]
Gets a reference to the existing value in the set, if it exists
pub fn contains(&self, item: I) -> bool
[src]
Returns true
if the set contains a value.
Trait Implementations
impl<'a, 'b, A, B> PartialEq<Set<'b, B>> for Set<'a, A> where
A: PartialEq<B>,
[src]
A: PartialEq<B>,
fn eq(&self, other: &Set<'b, B>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'arena, I: Copy> Copy for Set<'arena, I>
[src]
impl<'arena, I: Clone> Clone for Set<'arena, I>
[src]
fn clone(&self) -> Set<'arena, I>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'arena, I> From<Set<'arena, I>> for BloomSet<'arena, I> where
I: Eq + Hash + Copy + AsRef<[u8]>,
[src]
I: Eq + Hash + Copy + AsRef<[u8]>,
impl<'arena, I> From<BloomSet<'arena, I>> for Set<'arena, I>
[src]
impl<I, '_> Default for Set<'_, I>
[src]
impl<'arena, I> IntoIterator for Set<'arena, I>
[src]
type Item = &'arena I
The type of the elements being iterated over.
type IntoIter = SetIter<'arena, I>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'arena, I> Debug for Set<'arena, I> where
I: Debug,
[src]
I: Debug,
Auto Trait Implementations
Blanket Implementations
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> From<T> for T
[src]
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, 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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,