flex_alloc::alloc

Trait ConvertAlloc

Source
pub trait ConvertAlloc<Target> {
    // Required method
    fn convert(self) -> Target;
}
Expand description

Convert between types in this crate and standard containers.

Required Methods§

Source

fn convert(self) -> Target

Convert directly into the target type, ideally without reallocating.

Implementations on Foreign Types§

Source§

impl<T, C> ConvertAlloc<Vec<T, C>> for Box<[T]>
where C: VecConfigAlloc<T, Alloc = Global>,

Source§

fn convert(self) -> Vec<T, C>

Source§

impl<T, C> ConvertAlloc<Vec<T, C>> for Vec<T>
where C: VecConfigAlloc<T, Alloc = Global, Index = usize>,

Source§

fn convert(self) -> Vec<T, C>

Source§

impl<T: ?Sized> ConvertAlloc<Box<T>> for Box<T>

Source§

fn convert(self) -> Box<T, Global>

Implementors§

Source§

impl<T, C> ConvertAlloc<Box<[T]>> for flex_alloc::vec::Vec<T, C>
where C: VecConfigAlloc<T, Alloc = Global>,

Source§

impl<T, C> ConvertAlloc<Vec<T>> for flex_alloc::vec::Vec<T, C>
where C: VecConfigAlloc<T, Alloc = Global, Index = usize>,

Source§

impl<T: ?Sized> ConvertAlloc<Box<T>> for flex_alloc::boxed::Box<T, Global>