Enum rs_es::units::OneOrMany [] [src]

pub enum OneOrMany<T> {
    One(T),
    Many(Vec<T>),
}

A non-specific holder for an option which can either be a single thing, or multiple instances of that thing.

Variants

Trait Implementations

impl<T: Debug> Debug for OneOrMany<T>
[src]

Formats the value using the given formatter.

impl<T: Default> Default for OneOrMany<T>
[src]

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

impl<T> Serialize for OneOrMany<T> where T: Serialize
[src]

Serializes this value into this serializer.

impl<T> From<T> for OneOrMany<T>
[src]

Performs the conversion.

impl<T> From<Vec<T>> for OneOrMany<T>
[src]

Performs the conversion.