IntoStorage

Trait IntoStorage 

Source
pub trait IntoStorage {
    type Output: Storage;

    // Required method
    fn into_storage(self) -> Self::Output;
}
Expand description

Trait for converting owned and borrowed element containers (Vec<T>, slices) into their corresponding Storage type.

This is used by Tensor::from_data.

Required Associated Types§

Required Methods§

Source

fn into_storage(self) -> Self::Output

Implementations on Foreign Types§

Source§

impl<'a, T> IntoStorage for &'a [T]

Source§

type Output = ViewData<'a, T>

Source§

fn into_storage(self) -> ViewData<'a, T>

Source§

impl<'a, T> IntoStorage for &'a mut [T]

Source§

impl<'a, T> IntoStorage for Cow<'a, [T]>
where [T]: ToOwned<Owned = Vec<T>>,

Source§

type Output = CowData<'a, T>

Source§

fn into_storage(self) -> Self::Output

Source§

impl<'a, T, const N: usize> IntoStorage for &'a [T; N]

Source§

type Output = ViewData<'a, T>

Source§

fn into_storage(self) -> ViewData<'a, T>

Implementors§