Trait IntersectsContains

Source
pub trait IntersectsContains:
    Shape
    + ContainsShape
    + IntersectsShape
    + Sized {
    // Provided methods
    fn contains_shape(&self, other: &dyn Shape) -> Option<bool> { ... }
    fn intersects_shape(&self, other: &dyn Shape) -> Option<bool> { ... }
}

Provided Methods§

Source

fn contains_shape(&self, other: &dyn Shape) -> Option<bool>

Returns

  • Some(true) if self contains other
  • Some(false) if self does not contain other
  • None if other isn’t a supported Shape
Source

fn intersects_shape(&self, other: &dyn Shape) -> Option<bool>

Returns

  • Some(true) if self intersects other
  • Some(false) if self does not intersects other
  • None if other isn’t a supported Shape

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.

Implementors§