Trait tract_tensorflow::prelude::tract_ndarray::RawDataSubst[][src]

pub trait RawDataSubst<A>: RawData {
    type Output: RawData;
    unsafe fn data_subst(self) -> Self::Output;
}
Expand description

Array representation trait.

The RawDataSubst trait maps the element type of array storage, while keeping the same kind of storage.

For example, RawDataSubst<B> can map the type OwnedRepr<A> to OwnedRepr<B>.

Associated Types

type Output: RawData[src]

The resulting array storage of the same kind but substituted element type

Required methods

unsafe fn data_subst(self) -> Self::Output[src]

Unsafely translate the data representation from one element representation to another.

Safety

Caller must ensure the two types have the same representation.

Implementors

impl<'a, A, B> RawDataSubst<B> for ViewRepr<&'a A> where
    B: 'a,
    A: 'a, 
[src]

type Output = ViewRepr<&'a B>

pub unsafe fn data_subst(self) -> <ViewRepr<&'a A> as RawDataSubst<B>>::Output[src]

impl<'a, A, B> RawDataSubst<B> for ViewRepr<&'a mut A> where
    B: 'a,
    A: 'a, 
[src]

type Output = ViewRepr<&'a mut B>

pub unsafe fn data_subst(
    self
) -> <ViewRepr<&'a mut A> as RawDataSubst<B>>::Output
[src]

impl<A, B> RawDataSubst<B> for OwnedArcRepr<A>[src]

type Output = OwnedArcRepr<B>

pub unsafe fn data_subst(self) -> <OwnedArcRepr<A> as RawDataSubst<B>>::Output[src]

impl<A, B> RawDataSubst<B> for OwnedRepr<A>[src]

type Output = OwnedRepr<B>

pub unsafe fn data_subst(self) -> <OwnedRepr<A> as RawDataSubst<B>>::Output[src]

impl<A, B> RawDataSubst<B> for RawViewRepr<*const A>[src]

type Output = RawViewRepr<*const B>

pub unsafe fn data_subst(
    self
) -> <RawViewRepr<*const A> as RawDataSubst<B>>::Output
[src]

impl<A, B> RawDataSubst<B> for RawViewRepr<*mut A>[src]

type Output = RawViewRepr<*mut B>

pub unsafe fn data_subst(
    self
) -> <RawViewRepr<*mut A> as RawDataSubst<B>>::Output
[src]