pub struct Rect2D<T> { /* private fields */ }
Expand description
A 2D rectangle stored in host memory in row-major order
Implementations§
source§impl<T> Rect2D<T>
impl<T> Rect2D<T>
pub fn new(v: &[T], width: usize) -> Box<Self>where T: Copy,
pub fn new_uninit(width: usize, height: usize) -> RectBox2D<MaybeUninit<T>>
pub fn new_in<A: Allocator>(v: &[T], width: usize, alloc: A) -> Box<Self, A>where T: Copy,
Available on crate feature
svm
only.pub fn new_uninit_in<A: Allocator>( width: usize, height: usize, alloc: A ) -> Box<Rect2D<MaybeUninit<T>>, A>
Available on crate feature
svm
only.pub fn try_new(v: &[T], width: usize) -> Result<Box<Self>, AllocError>where T: Copy,
pub fn try_new_uninit( width: usize, height: usize ) -> Result<RectBox2D<MaybeUninit<T>>, AllocError>
pub fn try_new_in<A: Allocator>( v: &[T], width: usize, alloc: A ) -> Result<Box<Self, A>, AllocError>where T: Copy,
Available on crate feature
svm
only.pub fn try_new_uninit_in<A: Allocator>( width: usize, height: usize, alloc: A ) -> Result<Box<Rect2D<MaybeUninit<T>>, A>, AllocError>
Available on crate feature
svm
only.