Trait ndarray::RawDataSubst[][src]

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

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<Elem = A>[src]

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

Loading content...

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.

Loading content...

Implementors

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

type Output = ViewRepr<&'a B>

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

type Output = ViewRepr<&'a mut B>

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

type Output = OwnedArcRepr<B>

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

type Output = OwnedRepr<B>

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

type Output = RawViewRepr<*const B>

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

type Output = RawViewRepr<*mut B>

Loading content...