Struct ketos::name::NameSet [] [src]

pub struct NameSet {
    // some fields omitted
}

Represents a set of names

Methods

impl NameSet
[src]

fn new() -> NameSet

Returns a new NameSet.

fn clear(&mut self)

Removes all names from the set.

fn contains(&self, name: Name) -> bool

Returns whether the set contains the given name.

fn insert(&mut self, name: Name) -> bool

Inserts the given name into the set. Returns true if the name was not already contained.

fn into_slice(self) -> NameSetSlice

Lowers the set into a NameSetSlice, which may not receive new name values.

fn is_empty(&self) -> bool

Returns whether the set is empty.

fn iter(&self) -> SetIter

Returns an iterator over the set of contained names.

fn len(&self) -> usize

Returns the number of names contained in the set.

Trait Implementations

impl PartialEq for NameSet
[src]

fn eq(&self, __arg_0: &NameSet) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &NameSet) -> bool

This method tests for !=.

impl Eq for NameSet
[src]

impl Default for NameSet
[src]

fn default() -> NameSet

Returns the "default value" for a type. Read more

impl Debug for NameSet
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for NameSet
[src]

fn clone(&self) -> NameSet

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl FromIterator<Name> for NameSet
[src]

fn from_iter<I>(iterator: I) -> Self where I: IntoIterator<Item=Name>

Creates a value from an iterator. Read more

impl<'a> IntoIterator for &'a NameSet
[src]

type Item = Name

The type of the elements being iterated over.

type IntoIter = SetIter<'a>

Which kind of iterator are we turning this into?

fn into_iter(self) -> SetIter<'a>

Creates an iterator from a value. Read more