[][src]Enum finalfusion::chunks::storage::CowArray

pub enum CowArray<'a, A, D> {
    Borrowed(ArrayView<'a, A, D>),
    Owned(Array<A, D>),
}

Copy-on-write wrapper for Array/ArrayView.

The CowArray type stores an owned array or an array view. In both cases a view (as_view) or an owned array (into_owned) can be obtained. If the wrapped array is a view, retrieving an owned array will copy the underlying data.

Variants

Borrowed(ArrayView<'a, A, D>)Owned(Array<A, D>)

Methods

impl<'a, A, D> CowArray<'a, A, D> where
    D: Dimension
[src]

pub fn as_view(&self) -> ArrayView<A, D>[src]

impl<'a, A, D> CowArray<'a, A, D> where
    A: Clone,
    D: Dimension
[src]

pub fn into_owned(self) -> Array<A, D>[src]

Auto Trait Implementations

impl<'a, A, D> Sync for CowArray<'a, A, D> where
    A: Sync,
    D: Sync

impl<'a, A, D> Send for CowArray<'a, A, D> where
    A: Send + Sync,
    D: Send

impl<'a, A, D> Unpin for CowArray<'a, A, D> where
    A: Unpin,
    D: Unpin

impl<'a, A, D> RefUnwindSafe for CowArray<'a, A, D> where
    A: RefUnwindSafe,
    D: RefUnwindSafe

impl<'a, A, D> UnwindSafe for CowArray<'a, A, D> where
    A: RefUnwindSafe + UnwindSafe,
    D: UnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]