pub trait OneOrMany<T> {
    type Iter: Iterator<Item = T>;

    fn into_iter(self) -> Self::Iter;
}
Expand description

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.

Required Associated Types§

The iterator type.

Required Methods§

Convert this item into an iterator.

Implementations on Foreign Types§

Implementors§