pub trait ContainsShape {
    // Provided methods
    fn contains_rect(&self, rect: &Rect) -> bool
       where Self: Shape + Sized { ... }
    fn contains_circle(&self, circle: &Circle) -> bool
       where Self: Shape + Sized { ... }
    fn contains_line(&self, line: &Line) -> bool
       where Self: Shape + Sized { ... }
    fn contains_triangle(&self, triangle: &Triangle) -> bool
       where Self: Shape + Sized { ... }
    fn contains_ellipse(&self, ellipse: &Ellipse) -> bool
       where Self: Shape + Sized { ... }
    fn contains_polygon(&self, polygon: &Polygon) -> bool
       where Self: Shape + Sized { ... }
}
Expand description

A shape counts as contained if it is fully inside

Provided Methods§

source

fn contains_rect(&self, rect: &Rect) -> bool
where Self: Shape + Sized,

Returns true if self contains rect

source

fn contains_circle(&self, circle: &Circle) -> bool
where Self: Shape + Sized,

Returns true if self contains circle

source

fn contains_line(&self, line: &Line) -> bool
where Self: Shape + Sized,

Returns true if self contains line

source

fn contains_triangle(&self, triangle: &Triangle) -> bool
where Self: Shape + Sized,

Returns true if self contains triangle

source

fn contains_ellipse(&self, ellipse: &Ellipse) -> bool
where Self: Shape + Sized,

Returns true if self contains ellipse

source

fn contains_polygon(&self, polygon: &Polygon) -> bool
where Self: Shape + Sized,

Returns true if self contains polygon

Implementors§