Struct rust_rectangle_dividing::rectangle::Rectangle
source · pub struct Rectangle<T>where
T: Copy + Num + NumAssignOps + NumOps,{ /* private fields */ }Expand description
rectangle in 2D space with a width and height
Implementations§
Trait Implementations§
source§impl<T> PartialEq for Rectangle<T>where
T: Copy + Num + NumAssignOps + NumOps + PartialEq,
impl<T> PartialEq for Rectangle<T>where T: Copy + Num + NumAssignOps + NumOps + PartialEq,
source§impl<T> RectangleSize<T> for Rectangle<T>where
T: Copy + Num + NumAssignOps + NumOps,
impl<T> RectangleSize<T> for Rectangle<T>where T: Copy + Num + NumAssignOps + NumOps,
A rectangle in 2D space with a width and height
source§impl<T> SizeForAxis<T> for Rectangle<T>where
T: Copy + Num + NumAssignOps + NumOps,
impl<T> SizeForAxis<T> for Rectangle<T>where T: Copy + Num + NumAssignOps + NumOps,
fn size_for_axis(&self, axis: Axis) -> T
impl<T> Copy for Rectangle<T>where T: Copy + Num + NumAssignOps + NumOps + Copy,
impl<T> StructuralPartialEq for Rectangle<T>where T: Copy + Num + NumAssignOps + NumOps,
Auto Trait Implementations§
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, 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>where
Self: Sized + RectangleSize<T> + Clone,
T: Copy + Num + NumAssignOps,
fn divide_by_values_and_axis(&self, values: &Vec<T>, axis: Axis) -> Vec<Self>where Self: Sized + RectangleSize<T> + Clone, T: Copy + Num + NumAssignOps,
dividing a rectangle into specified number of rectangles specified by axis
source§fn divide_by_weights_and_axis(&self, weights: &Vec<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: &Vec<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