Trait normal_form::set::Set

source ·
pub trait Set {
    type Item: Clone + Ord;
    type Map<V>: Map<Self::Item, V>;
    type Iter<'a>: 'a + Iterator<Item = Self::Item>
       where Self: 'a;

    // Required methods
    fn len(&self) -> usize;
    fn iter(&self) -> Self::Iter<'_>;
    fn map<V: Clone, F>(&self, f: F) -> Self::Map<V>
       where F: Fn(&Self::Item) -> V;
}
Expand description

Ordered set.

Required Associated Types§

source

type Item: Clone + Ord

Type of the items of the set.

source

type Map<V>: Map<Self::Item, V>

Map type, binding each item of the graph to a value V.

Example

Vec<V>.

source

type Iter<'a>: 'a + Iterator<Item = Self::Item> where Self: 'a

Items iterator.

Required Methods§

source

fn len(&self) -> usize

The number of elements in the set.

source

fn iter(&self) -> Self::Iter<'_>

Returns an iterator over the items of the set.

source

fn map<V: Clone, F>(&self, f: F) -> Self::Map<V>where F: Fn(&Self::Item) -> V,

Implementations on Foreign Types§

source§

impl Set for u64

§

type Map<V> = Vec<V, Global>

Map type, binding each item of the graph to a value V.

Example

Vec<V>.

§

type Iter<'a> = Range<u64>

Items iterator.

source§

fn len(&self) -> usize

The number of elements in the set.

source§

fn iter(&self) -> Self::Iter<'_>

Returns an iterator over the items of the set.

§

type Item = u64

source§

fn map<V: Clone, F>(&self, f: F) -> Self::Map<V>where F: Fn(&Self::Item) -> V,

source§

impl Set for u32

§

type Map<V> = Vec<V, Global>

Map type, binding each item of the graph to a value V.

Example

Vec<V>.

§

type Iter<'a> = Range<u32>

Items iterator.

source§

fn len(&self) -> usize

The number of elements in the set.

source§

fn iter(&self) -> Self::Iter<'_>

Returns an iterator over the items of the set.

§

type Item = u32

source§

fn map<V: Clone, F>(&self, f: F) -> Self::Map<V>where F: Fn(&Self::Item) -> V,

source§

impl Set for usize

§

type Map<V> = Vec<V, Global>

Map type, binding each item of the graph to a value V.

Example

Vec<V>.

§

type Iter<'a> = Range<usize>

Items iterator.

source§

fn len(&self) -> usize

The number of elements in the set.

source§

fn iter(&self) -> Self::Iter<'_>

Returns an iterator over the items of the set.

§

type Item = usize

source§

fn map<V: Clone, F>(&self, f: F) -> Self::Map<V>where F: Fn(&Self::Item) -> V,

Implementors§