[−][src]Enum rust2vec::storage::CowArray
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]
D: Dimension,
impl<'a, A, D> CowArray<'a, A, D> where
A: Clone,
D: Dimension,
[src]
A: Clone,
D: Dimension,
pub fn into_owned(self) -> Array<A, D>
[src]
Auto Trait Implementations
impl<'a, A, D> Send for CowArray<'a, A, D> where
A: Send + Sync,
D: Send,
A: Send + Sync,
D: Send,
impl<'a, A, D> Sync for CowArray<'a, A, D> where
A: Sync,
D: Sync,
A: Sync,
D: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,