pub struct Rectangle<T>{ /* private fields */ }Expand description
rectangle in 2D space with a width and height
Implementations§
Trait Implementations§
Source§impl<T> RectangleSize<T> for Rectangle<T>
A rectangle in 2D space with a width and height
impl<T> RectangleSize<T> for Rectangle<T>
A rectangle in 2D space with a width and height
Source§impl<T> SizeForAxis<T> for Rectangle<T>
impl<T> SizeForAxis<T> for Rectangle<T>
fn size_for_axis(&self, axis: Axis) -> T
impl<T> Copy for Rectangle<T>
impl<T> StructuralPartialEq for Rectangle<T>
Auto Trait Implementations§
impl<T> Freeze for Rectangle<T>where
T: Freeze,
impl<T> RefUnwindSafe for Rectangle<T>where
T: RefUnwindSafe,
impl<T> Send for Rectangle<T>where
T: Send,
impl<T> Sync for Rectangle<T>where
T: Sync,
impl<T> Unpin for Rectangle<T>where
T: Unpin,
impl<T> UnwindSafe for Rectangle<T>where
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> Dividing<T> for Uwhere
U: QuarterRotation + VerticalDividingHelper<T>,
T: Copy,
impl<T, U> Dividing<T> for Uwhere
U: QuarterRotation + VerticalDividingHelper<T>,
T: Copy,
Source§fn divide_vertical(&self, x: T) -> (U, U)
fn divide_vertical(&self, x: T) -> (U, U)
dividing a rectangle into two rectangles (vertical)
Source§fn divide_horizontal(&self, y: T) -> (U, U)
fn divide_horizontal(&self, y: T) -> (U, U)
dividing a rectangle into two rectangles (horizontal)
Source§fn divide(&self, v: T, axis: Axis) -> (Self, Self)where
Self: Sized,
fn divide(&self, v: T, axis: Axis) -> (Self, Self)where
Self: Sized,
dividing a rectangle into two rectangles specified by axis
Source§fn divide_by_values_and_axis(&self, values: &Vec<T>, axis: Axis) -> Vec<Self>
fn divide_by_values_and_axis(&self, values: &Vec<T>, axis: Axis) -> Vec<Self>
dividing a rectangle into specified number of rectangles specified by axis
Source§fn divide_by_weights_and_axis(&self, weights: &[T], axis: Axis) -> Vec<Self>where
Self: Sized + RectangleSize<T> + Clone + SizeForAxis<T>,
T: Copy + for<'a> Sum<&'a T> + Num + NumAssignOps + NumOps,
fn divide_by_weights_and_axis(&self, weights: &[T], axis: Axis) -> Vec<Self>where
Self: Sized + RectangleSize<T> + Clone + SizeForAxis<T>,
T: Copy + for<'a> Sum<&'a T> + Num + NumAssignOps + NumOps,
dividing a rectangle into specified weights of rectangles specified by axis