pub struct Buffer<T> { /* private fields */ }Expand description
Contiguous, heap-allocated buffer for storing raw numerical data.
Buffer<T> is the fundamental storage engine used across Rusanta constructs
like NdArray, Tensor, and Series.
Implementations§
Source§impl<T: Numeric> Buffer<T>
impl<T: Numeric> Buffer<T>
Sourcepub fn filled(value: T, len: usize) -> Self
pub fn filled(value: T, len: usize) -> Self
Creates a new Buffer of specified size filled with a default value.
Sourcepub fn as_slice(&self) -> &[T]
pub fn as_slice(&self) -> &[T]
Provides an immutable reference to the underlying contiguous slice.
Sourcepub fn as_mut_slice(&mut self) -> &mut [T]
pub fn as_mut_slice(&mut self) -> &mut [T]
Provides a mutable reference to the underlying contiguous slice.
Trait Implementations§
impl<T: Eq> Eq for Buffer<T>
impl<T: PartialEq> StructuralPartialEq for Buffer<T>
Auto Trait Implementations§
impl<T> Freeze for Buffer<T>
impl<T> RefUnwindSafe for Buffer<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for Buffer<T>
impl<T> Sync for Buffer<T>
impl<T> Unpin for Buffer<T>
impl<T> UnsafeUnpin for Buffer<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for Buffer<T>where
Vec<T>: UnwindSafe,
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