Trait Holds

Source
pub trait Holds<I> {
    // Required method
    fn holds(&self, object: &I) -> bool;
}
Expand description

Tests if an object in holded by an other

Required Methods§

Source

fn holds(&self, object: &I) -> bool

Implementations on Foreign Types§

Source§

impl<T> Holds<T> for RangeFull

Source§

fn holds(&self, _object: &T) -> bool

Source§

impl<T: PartialOrd> Holds<T> for (Bound<T>, Bound<T>)

Source§

fn holds(&self, object: &T) -> bool

Source§

impl<T: PartialOrd> Holds<T> for Range<T>

Source§

fn holds(&self, object: &T) -> bool

Source§

impl<T: PartialOrd> Holds<T> for RangeFrom<T>

Source§

fn holds(&self, object: &T) -> bool

Source§

impl<T: PartialOrd> Holds<T> for RangeInclusive<T>

Source§

fn holds(&self, object: &T) -> bool

Source§

impl<T: PartialOrd> Holds<T> for RangeTo<T>

Source§

fn holds(&self, object: &T) -> bool

Source§

impl<T: PartialOrd> Holds<T> for RangeToInclusive<T>

Source§

fn holds(&self, object: &T) -> bool

Implementors§

Source§

impl<N: Scalar + PartialOrd, const D: usize> Holds<OPoint<N, Const<D>>> for BBox<N, D>

Checks if bbox holds given point

§Example

use nalgebra::point;
use pythagore::{BBox, Holds};

assert!(BBox::from(point![0, 0]..point![5, 5]).holds(&point![2, 2]));