Trait rocket::http::ext::IntoCollection[]

pub trait IntoCollection<T> {
    fn into_collection<A>(self) -> SmallVec<A>
    where
        A: Array<Item = T>
; }
Expand description

Trait implemented by types that can be converted into a collection.

Required methods

fn into_collection<A>(self) -> SmallVec<A> where
    A: Array<Item = T>, 

Converts self into a collection.

Implementations on Foreign Types

impl<T, const N: usize> IntoCollection<T> for [T; N]

pub fn into_collection<A>(self) -> SmallVec<A> where
    A: Array<Item = T>, 

pub fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
    F: FnMut(T) -> U,
    A: Array<Item = U>, 

impl<'_, T> IntoCollection<T> for &'_ [T] where
    T: Clone

pub fn into_collection<A>(self) -> SmallVec<A> where
    A: Array<Item = T>, 

pub fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
    F: FnMut(T) -> U,
    A: Array<Item = U>, 

impl<T> IntoCollection<T> for Vec<T, Global>

pub fn into_collection<A>(self) -> SmallVec<A> where
    A: Array<Item = T>, 

pub fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
    F: FnMut(T) -> U,
    A: Array<Item = U>, 

Implementors

impl<T> IntoCollection<T> for T

pub fn into_collection<A>(self) -> SmallVec<A> where
    A: Array<Item = T>, 

pub fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
    F: FnMut(T) -> U,
    A: Array<Item = U>,