Trait AsArrayAPI

Source
pub trait AsArrayAPI<Inp>: Sized {
    type Out;

    // Required method
    fn asarray_f(self) -> Result<Self::Out>;

    // Provided method
    fn asarray(self) -> Self::Out { ... }
}

Required Associated Types§

Required Methods§

Source

fn asarray_f(self) -> Result<Self::Out>

Provided Methods§

Source

fn asarray(self) -> Self::Out

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 AsArrayAPI<()> for f32

Source§

impl AsArrayAPI<()> for f64

Source§

impl AsArrayAPI<()> for i8

Source§

impl AsArrayAPI<()> for i16

Source§

impl AsArrayAPI<()> for i32

Source§

impl AsArrayAPI<()> for i64

Source§

impl AsArrayAPI<()> for i128

Source§

impl AsArrayAPI<()> for isize

Source§

impl AsArrayAPI<()> for u8

Source§

impl AsArrayAPI<()> for u16

Source§

impl AsArrayAPI<()> for u32

Source§

impl AsArrayAPI<()> for u64

Source§

impl AsArrayAPI<()> for u128

Source§

impl AsArrayAPI<()> for usize

Source§

impl AsArrayAPI<()> for Complex32

Source§

impl AsArrayAPI<()> for Complex64

Source§

impl<'a, T> AsArrayAPI<()> for &'a [T]
where T: Clone,

Source§

impl<'a, T> AsArrayAPI<()> for &'a mut [T]
where T: Clone,

Source§

impl<'a, T, B> AsArrayAPI<()> for (&'a [T], &B)
where T: Clone, B: DeviceAPI<T, Raw = Vec<T>>,

Source§

type Out = TensorBase<Storage<DataRef<'a, <B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>

Source§

fn asarray_f(self) -> Result<Self::Out>

Source§

impl<'a, T, B> AsArrayAPI<()> for (&'a Vec<T>, &B)
where T: Clone, B: DeviceAPI<T, Raw = Vec<T>>,

Source§

type Out = TensorBase<Storage<DataRef<'a, <B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>

Source§

fn asarray_f(self) -> Result<Self::Out>

Source§

impl<'a, T, B> AsArrayAPI<()> for (&'a mut [T], &B)
where T: Clone, B: DeviceAPI<T, Raw = Vec<T>>,

Source§

type Out = TensorBase<Storage<DataMut<'a, <B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>

Source§

fn asarray_f(self) -> Result<Self::Out>

Source§

impl<'a, T, B> AsArrayAPI<()> for (&'a mut Vec<T>, &B)
where T: Clone, B: DeviceAPI<T, Raw = Vec<T>>,

Source§

type Out = TensorBase<Storage<DataMut<'a, <B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>

Source§

fn asarray_f(self) -> Result<Self::Out>

Source§

impl<'a, T, B, D, L> AsArrayAPI<D> for (&'a [T], L, &B)
where T: Clone, B: DeviceAPI<T, Raw = Vec<T>>, D: DimAPI, L: Into<Layout<D>>,

Source§

type Out = TensorBase<Storage<DataRef<'a, <B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>

Source§

fn asarray_f(self) -> Result<Self::Out>

Source§

impl<'a, T, B, D, L> AsArrayAPI<D> for (&'a Vec<T>, L, &B)
where T: Clone, B: DeviceAPI<T, Raw = Vec<T>> + 'a, D: DimAPI, L: Into<Layout<D>>,

Source§

type Out = TensorBase<Storage<DataRef<'a, <B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>

Source§

fn asarray_f(self) -> Result<Self::Out>

Source§

impl<'a, T, B, D, L> AsArrayAPI<D> for (&'a mut [T], L, &B)
where T: Clone, B: DeviceAPI<T, Raw = Vec<T>>, D: DimAPI, L: Into<Layout<D>>,

Source§

type Out = TensorBase<Storage<DataMut<'a, <B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>

Source§

fn asarray_f(self) -> Result<Self::Out>

Source§

impl<'a, T, B, D, L> AsArrayAPI<D> for (&'a mut Vec<T>, L, &B)
where T: Clone, B: DeviceAPI<T, Raw = Vec<T>>, D: DimAPI, L: Into<Layout<D>>,

Source§

type Out = TensorBase<Storage<DataMut<'a, <B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>

Source§

fn asarray_f(self) -> Result<Self::Out>

Source§

impl<'a, T, D, L> AsArrayAPI<D> for (&'a [T], L)
where T: Clone, D: DimAPI, L: Into<Layout<D>>,

Source§

impl<'a, T, D, L> AsArrayAPI<D> for (&'a Vec<T>, L)
where T: Clone, D: DimAPI, L: Into<Layout<D>>,

Source§

impl<'a, T, D, L> AsArrayAPI<D> for (&'a mut [T], L)
where T: Clone, D: DimAPI, L: Into<Layout<D>>,

Source§

impl<'a, T, D, L> AsArrayAPI<D> for (&'a mut Vec<T>, L)
where T: Clone, D: DimAPI, L: Into<Layout<D>>,

Source§

impl<B> AsArrayAPI<()> for (f32, &B)

Source§

impl<B> AsArrayAPI<()> for (f64, &B)

Source§

impl<B> AsArrayAPI<()> for (i8, &B)

Source§

impl<B> AsArrayAPI<()> for (i16, &B)

Source§

impl<B> AsArrayAPI<()> for (i32, &B)

Source§

impl<B> AsArrayAPI<()> for (i64, &B)

Source§

impl<B> AsArrayAPI<()> for (i128, &B)

Source§

impl<B> AsArrayAPI<()> for (isize, &B)

Source§

impl<B> AsArrayAPI<()> for (u8, &B)

Source§

impl<B> AsArrayAPI<()> for (u16, &B)

Source§

impl<B> AsArrayAPI<()> for (u32, &B)

Source§

impl<B> AsArrayAPI<()> for (u64, &B)

Source§

impl<B> AsArrayAPI<()> for (u128, &B)

Source§

impl<B> AsArrayAPI<()> for (usize, &B)

Source§

impl<B> AsArrayAPI<()> for (Complex32, &B)

Source§

impl<B> AsArrayAPI<()> for (Complex64, &B)

Source§

impl<R, T, B, D> AsArrayAPI<()> for (&TensorAny<R, T, B, D>, TensorIterOrder)
where R: DataAPI<Data = B::Raw>, T: Clone, D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T> + OpAssignAPI<T, D>,

Source§

type Out = TensorBase<Storage<DataOwned<<B as DeviceRawAPI<T>>::Raw>, T, B>, D>

Source§

fn asarray_f(self) -> Result<Self::Out>

Source§

impl<T, B> AsArrayAPI<()> for (Vec<T>, &B)

Source§

impl<T, B, D> AsArrayAPI<()> for (Tensor<T, B, D>, TensorIterOrder)
where T: Clone, D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T> + OpAssignAPI<T, D>,

Source§

type Out = TensorBase<Storage<DataOwned<<B as DeviceRawAPI<T>>::Raw>, T, B>, D>

Source§

fn asarray_f(self) -> Result<Self::Out>

Source§

impl<T, B, D, L> AsArrayAPI<D> for (Vec<T>, L, &B)
where D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T>, L: Into<Layout<D>>,

Source§

impl<T, D, L> AsArrayAPI<D> for (Vec<T>, L)
where T: Clone, D: DimAPI, L: Into<Layout<D>>,

Implementors§

Source§

impl<'a, T> AsArrayAPI<()> for &'a Vec<T>
where T: Clone,

Source§

impl<'a, T> AsArrayAPI<()> for &'a mut Vec<T>
where T: Clone,

Source§

impl<R, T, B, D> AsArrayAPI<()> for &TensorAny<R, T, B, D>
where R: DataAPI<Data = B::Raw>, T: Clone, D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T> + OpAssignAPI<T, D>,

Source§

type Out = TensorBase<Storage<DataOwned<<B as DeviceRawAPI<T>>::Raw>, T, B>, D>

Source§

impl<T> AsArrayAPI<()> for Vec<T>
where T: Clone,

Source§

impl<T, B, D> AsArrayAPI<()> for Tensor<T, B, D>
where T: Clone, D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T> + OpAssignAPI<T, D>,

Source§

type Out = TensorBase<Storage<DataOwned<<B as DeviceRawAPI<T>>::Raw>, T, B>, D>