Collection

Trait Collection 

Source
pub trait Collection {
    type Item;

    // Required method
    fn add(self, item: Self::Item) -> Self;
}

Required Associated Types§

Required Methods§

Source

fn add(self, item: Self::Item) -> Self

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.

Implementations on Foreign Types§

Source§

impl<T> Collection for Vec<T>

Source§

type Item = T

Source§

fn add(self, item: Self::Item) -> Self

Source§

impl<T: Ord> Collection for BTreeSet<T>

Source§

type Item = T

Source§

fn add(self, item: Self::Item) -> Self

Implementors§