nyx_space::linalg::storage

Trait Storage

Source
pub unsafe trait Storage<T, R, C = Const<1>>: RawStorage<T, R, C>
where T: Scalar, R: Dim, C: Dim,
{ // Required methods fn into_owned(self) -> <DefaultAllocator as Allocator<R, C>>::Buffer<T> where DefaultAllocator: Allocator<R, C>; fn clone_owned(&self) -> <DefaultAllocator as Allocator<R, C>>::Buffer<T> where DefaultAllocator: Allocator<R, C>; fn forget_elements(self); }
Expand description

Trait shared by all matrix data storage that don’t contain any uninitialized elements.

§Safety

Note that Self must always have a number of elements compatible with the matrix length (given by R and C if they are known at compile-time). For example, implementors of this trait should not allow the user to modify the size of the underlying buffer with safe methods (for example the VecStorage::data_mut method is unsafe because the user could change the vector’s size so that it no longer contains enough elements: this will lead to UB.

Required Methods§

Source

fn into_owned(self) -> <DefaultAllocator as Allocator<R, C>>::Buffer<T>

Builds a matrix data storage that does not contain any reference.

Source

fn clone_owned(&self) -> <DefaultAllocator as Allocator<R, C>>::Buffer<T>

Clones this data storage to one that does not contain any reference.

Source

fn forget_elements(self)

Drops the storage without calling the destructors on the contained elements.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, T, R, C, RStride, CStride> Storage<T, R, C> for ViewStorage<'a, T, R, C, RStride, CStride>
where T: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim,

Source§

impl<'a, T, R, C, RStride, CStride> Storage<T, R, C> for ViewStorageMut<'a, T, R, C, RStride, CStride>
where T: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim,

Source§

impl<T, C> Storage<T, Dyn, C> for VecStorage<T, Dyn, C>
where T: Scalar, C: Dim, DefaultAllocator: Allocator<Dyn, C, Buffer<T> = VecStorage<T, Dyn, C>>,

Source§

impl<T, R> Storage<T, R, Dyn> for VecStorage<T, R, Dyn>
where T: Scalar, R: DimName, DefaultAllocator: Allocator<R, Dyn, Buffer<T> = VecStorage<T, R, Dyn>>,

Source§

impl<T, const R: usize, const C: usize> Storage<T, Const<R>, Const<C>> for ArrayStorage<T, R, C>
where T: Scalar, DefaultAllocator: Allocator<Const<R>, Const<C>, Buffer<T> = ArrayStorage<T, R, C>>,