pub struct NativeArray<T: Element> { /* private fields */ }Expand description
An array of the Native backend: its elements (shared if large) and a
shape.
Implementations§
Source§impl<T: Element> NativeArray<T>
impl<T: Element> NativeArray<T>
Sourcepub fn new(data: Vec<T>, shape: impl Into<Shape>) -> Self
pub fn new(data: Vec<T>, shape: impl Into<Shape>) -> Self
Creates an array from its elements in row-major order.
§Panics
Panics if the number of elements does not match the shape.
Trait Implementations§
Source§impl<T: Element> Debug for NativeArray<T>
impl<T: Element> Debug for NativeArray<T>
impl<T: PartialEq + Element> StructuralPartialEq for NativeArray<T>
Auto Trait Implementations§
impl<T> Freeze for NativeArray<T>where
T: Freeze,
impl<T> RefUnwindSafe for NativeArray<T>where
T: RefUnwindSafe,
impl<T> Send for NativeArray<T>
impl<T> Sync for NativeArray<T>
impl<T> Unpin for NativeArray<T>where
T: Unpin,
impl<T> UnsafeUnpin for NativeArray<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for NativeArray<T>where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more