Trait DefaultSet

Source
pub trait DefaultSet: Sized {
    type Set: FromIterator<Self>;

    // Provided method
    fn set_from_iter(iter: impl IntoIterator<Item = Self>) -> Self::Set { ... }
}
Expand description

A trait for getting the default “set” type from an “element” type.

This trait has a blanket implementation for bitflags-like types.

Required Associated Types§

Provided Methods§

Source

fn set_from_iter(iter: impl IntoIterator<Item = Self>) -> Self::Set

Construct a Set using Set::from_iter.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> DefaultSet for T
where T: BitOr, <T as BitOr>::Output: FromIterator<Self>,

Source§

type Set = <T as BitOr>::Output