pub trait Contains<T> {
    // Required method
    fn contains(&self, other: &T) -> Containment;

    // Provided methods
    fn encloses(&self, other: &T) -> bool { ... }
    fn partially_intersects(&self, other: &T) -> bool { ... }
}
Expand description

Provides information on whether a shape contains another shape.

Required Methods§

source

fn contains(&self, other: &T) -> Containment

Returns a Containment indicating how other is enclosed within this shape.

Provided Methods§

source

fn encloses(&self, other: &T) -> bool

Returns true if other is fully enclosed in this shape.

source

fn partially_intersects(&self, other: &T) -> bool

Returns true if other is fully or partially enclosed in this shape.

Implementors§