pub struct Range2D {
pub offset_x: usize,
pub offset_y: usize,
pub region_x: NonZeroUsize,
pub region_y: NonZeroUsize,
}
Fields§
§offset_x: usize
§offset_y: usize
§region_x: NonZeroUsize
§region_y: NonZeroUsize
Implementations§
source§impl Range2D
impl Range2D
pub const fn new( offset_x: usize, offset_y: usize, region_x: NonZeroUsize, region_y: NonZeroUsize ) -> Self
pub fn try_new( offset_x: usize, offset_y: usize, region_x: usize, region_y: usize ) -> Result<Self>
pub fn from_range<X: RangeBounds<usize>, Y: RangeBounds<usize>>( x: X, y: Y, max_x: usize, max_y: usize ) -> Result<Self>
pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn size(&self) -> Option<NonZeroUsize>
pub fn raw_parts(&self) -> [[usize; 3]; 2]
pub fn raw_parts_buffer<T>(&self) -> [[usize; 3]; 2]
Trait Implementations§
source§impl IntoRange2D for Range2D
impl IntoRange2D for Range2D
source§impl PartialEq<Range2D> for Range2D
impl PartialEq<Range2D> for Range2D
impl Copy for Range2D
impl Eq for Range2D
impl StructuralEq for Range2D
impl StructuralPartialEq for Range2D
Auto Trait Implementations§
impl RefUnwindSafe for Range2D
impl Send for Range2D
impl Sync for Range2D
impl Unpin for Range2D
impl UnwindSafe for Range2D
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