Trait frame_support::weights::OneOrMany[][src]

pub trait OneOrMany<T> {
    type Iter: Iterator<Item = T>;
    fn into_iter(self) -> Self::Iter;
}

A trait that represents one or many values of given type.

Useful to accept as parameter type to let the caller pass either a single value directly or an iterator.

Associated Types

type Iter: Iterator<Item = T>[src]

The iterator type.

Loading content...

Required methods

fn into_iter(self) -> Self::Iter[src]

Convert this item into an iterator.

Loading content...

Implementations on Foreign Types

impl<'a> OneOrMany<DispatchClass> for &'a [DispatchClass][src]

type Iter = Cloned<Iter<'a, DispatchClass>>

Loading content...

Implementors

impl OneOrMany<DispatchClass> for DispatchClass[src]

type Iter = Once<DispatchClass>

Loading content...