Struct grid_search_maze::Size [−]
pub struct Size { /* fields omitted */ }
Expand description
A size cannot be created which would contain un-addressable cells.
That is, the maximum size has a width and height of one greater than the maximum i32
.
Implementations
impl Size
impl Size
Creates a new Size
.
Panics if width
or width
is greater than ::core::i32::MAX as u32 + 1
.
Like new, but const and never panics as it’s impossible to construct an invalid size
pub fn from_coord(coord: Coord) -> Result<Size, NegativeDimension>
pub fn try_set_in_place(
&mut self,
axis: Axis,
value: u32
) -> Result<(), DimensionTooLargeForSize>
pub fn set_in_place(&mut self, axis: Axis, value: u32)
pub const fn try_new_axis(
this_axis: u32,
other_axis: u32,
axis: Axis
) -> Result<Size, DimensionTooLargeForSize>
pub fn get_static<A>(self) -> u32 where
A: StaticAxis,
pub fn get_static_mut<A>(&mut self) -> &mut u32 where
A: StaticAxis,
pub fn with_static_axis<A, F>(self, f: F) -> Size where
A: StaticAxis,
F: FnMut(u32) -> u32,
pub fn try_set_static<A>(
self,
value: u32
) -> Result<Size, DimensionTooLargeForSize> where
A: StaticAxis,
pub fn try_set_static_in_place<A>(
&mut self,
value: u32
) -> Result<(), DimensionTooLargeForSize> where
A: StaticAxis,
pub fn set_static<A>(self, value: u32) -> Size where
A: StaticAxis,
pub fn set_static_in_place<A>(&mut self, value: u32) where
A: StaticAxis,
pub fn try_new_static_axis<A>(
this_axis: u32,
other_axis: u32
) -> Result<Size, DimensionTooLargeForSize> where
A: StaticAxis,
pub fn new_static_axis<A>(this_axis: u32, other_axis: u32) -> Size where
A: StaticAxis,
pub fn try_set_width(self, width: u32) -> Result<Size, DimensionTooLargeForSize>
pub fn try_set_height(
self,
height: u32
) -> Result<Size, DimensionTooLargeForSize>
pub fn set_height(self, height: u32) -> Size
pub fn try_set_width_in_place(
&mut self,
width: u32
) -> Result<(), DimensionTooLargeForSize>
pub fn try_set_height_in_place(
&mut self,
height: u32
) -> Result<(), DimensionTooLargeForSize>
pub fn set_width_in_place(&mut self, width: u32)
pub fn set_height_in_place(&mut self, height: u32)
pub fn checked_sub(self, rhs: Size) -> Option<Size>
pub fn saturating_sub(self, rhs: Size) -> Size
pub const fn coord_iter_row_major(self) -> CoordIterRowMajor
pub fn pairwise_max(self, other: Size) -> Size
pub fn pairwise_min(self, other: Size) -> Size
Trait Implementations
pub fn div_assign(&mut self, rhs: T)
pub fn div_assign(&mut self, rhs: T)
Performs the /=
operation. Read more
pub fn mul_assign(&mut self, rhs: T)
pub fn mul_assign(&mut self, rhs: T)
Performs the *=
operation. Read more
impl PartialOrd<Size> for Size
impl PartialOrd<Size> for Size
pub fn partial_cmp(&self, other: &Size) -> Option<Ordering>
pub fn partial_cmp(&self, other: &Size) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl StructuralEq for Size
impl StructuralPartialEq for Size
Auto Trait Implementations
impl RefUnwindSafe for Size
impl UnwindSafe for Size
Blanket Implementations
Mutably borrows from an owned value. Read more