Skip to main content

RectangleSize

Trait RectangleSize 

Source
pub trait RectangleSize<T>
where T: Copy + Num + NumAssignOps + NumOps,
{ // Required methods fn width(&self) -> T; fn height(&self) -> T; }

Required Methods§

Source

fn width(&self) -> T

Source

fn height(&self) -> T

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> RectangleSize<T> for AxisAlignedRectangle<T>
where T: Copy + Num + NumAssignOps + NumOps,

A rectangle in 2D space with a width and height

Source§

impl<T> RectangleSize<T> for Rectangle<T>
where T: Copy + Num + NumAssignOps + NumOps,

A rectangle in 2D space with a width and height