Skip to main content

TypedArrayRef

Trait TypedArrayRef 

Source
pub trait TypedArrayRef<V: VTable>: AsRef<ArrayRef> + Deref<Target = V::ArrayData> {
    // Provided method
    fn to_owned(&self) -> Array<V> { ... }
}
Expand description

Shared bound for helpers that should work over both owned Array<V> and borrowed ArrayView<V>.

Extension traits use this to share typed array logic while still exposing the backing ArrayRef and the encoding-specific VTable::ArrayData.

Provided Methods§

Source

fn to_owned(&self) -> Array<V>

Returns an owned Array<V> from the reference.

Implementors§

Source§

impl<V: VTable> TypedArrayRef<V> for Array<V>

Source§

impl<V: VTable> TypedArrayRef<V> for ArrayView<'_, V>