Trait RectTrait

Source
pub trait RectTrait: GeometryTrait {
    type CoordType<'a>: 'a + CoordTrait<T = <Self as GeometryTrait>::T>
       where Self: 'a;

    // Required methods
    fn min(&self) -> Self::CoordType<'_>;
    fn max(&self) -> Self::CoordType<'_>;
}
Expand description

A trait for accessing data from a generic Rect.

A Rect is an axis-aligned bounded 2D rectangle whose area is defined by minimum and maximum Points.

Required Associated Types§

Source

type CoordType<'a>: 'a + CoordTrait<T = <Self as GeometryTrait>::T> where Self: 'a

The type of each underlying coordinate, which implements CoordTrait

Required Methods§

Source

fn min(&self) -> Self::CoordType<'_>

The minimum coordinate of this Rect

Source

fn max(&self) -> Self::CoordType<'_>

The maximum coordinate of this Rect

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, T: CoordNum + 'a> RectTrait for &'a Rect<T>

Source§

type CoordType<'b> = Coord<T> where Self: 'b

Source§

fn min(&self) -> Self::CoordType<'_>

Source§

fn max(&self) -> Self::CoordType<'_>

Source§

impl<T: CoordNum> RectTrait for Rect<T>

Source§

type CoordType<'b> = Coord<T> where Self: 'b

Source§

fn min(&self) -> Self::CoordType<'_>

Source§

fn max(&self) -> Self::CoordType<'_>

Implementors§