[−][src]Struct phf::Set
An immutable set constructed at compile time.
Note
The fields of this struct are public so that they may be initialized by the
phf_set! macro and code generation. They are subject to change at any
time and should never be accessed directly.
Methods
impl<T> Set<T>[src]
impl<T> Set<T>pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeReturns the number of elements in the Set.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolReturns true if the Set contains no elements.
pub fn get_key<U: ?Sized>(&self, key: &U) -> Option<&T> where
U: Eq + PhfHash,
T: Borrow<U>, [src]
pub fn get_key<U: ?Sized>(&self, key: &U) -> Option<&T> where
U: Eq + PhfHash,
T: Borrow<U>, Returns a reference to the set's internal static instance of the given key.
This can be useful for interning schemes.
pub fn contains<U: ?Sized>(&self, value: &U) -> bool where
U: Eq + PhfHash,
T: Borrow<U>, [src]
pub fn contains<U: ?Sized>(&self, value: &U) -> bool where
U: Eq + PhfHash,
T: Borrow<U>, Returns true if value is in the Set.
ⓘImportant traits for Iter<'a, T>pub fn iter<'a>(&'a self) -> Iter<'a, T>[src]
pub fn iter<'a>(&'a self) -> Iter<'a, T>Returns an iterator over the values in the set.
Values are returned in an arbitrary but fixed order.
impl<T> Set<T> where
T: Eq + PhfHash, [src]
impl<T> Set<T> where
T: Eq + PhfHash, pub fn is_disjoint(&self, other: &Set<T>) -> bool[src]
pub fn is_disjoint(&self, other: &Set<T>) -> boolReturns true if other shares no elements with self.
pub fn is_subset(&self, other: &Set<T>) -> bool[src]
pub fn is_subset(&self, other: &Set<T>) -> boolReturns true if other contains all values in self.
pub fn is_superset(&self, other: &Set<T>) -> bool[src]
pub fn is_superset(&self, other: &Set<T>) -> boolReturns true if self contains all values in other.
Trait Implementations
impl<'a, T> IntoIterator for &'a Set<T>[src]
impl<'a, T> IntoIterator for &'a Set<T>type Item = &'a T
The type of the elements being iterated over.
type IntoIter = Iter<'a, T>
Which kind of iterator are we turning this into?
ⓘImportant traits for Iter<'a, T>fn into_iter(self) -> Iter<'a, T>[src]
fn into_iter(self) -> Iter<'a, T>Creates an iterator from a value. Read more
impl<T> Debug for Set<T> where
T: Debug, [src]
impl<T> Debug for Set<T> where
T: Debug, Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more