Type Alias inter_val::RightBounded

source ·
pub type RightBounded<T, B> = HalfBounded<T, B, Right>;

Aliased Type§

struct RightBounded<T, B>(/* private fields */);

Implementations§

source§

impl<T: PartialOrd, B: BoundaryOf<Right>> RightBounded<T, B>

source

pub fn includes(&self, other: &Self) -> bool

source

pub fn contains(&self, t: &T) -> bool

source

pub fn intersection<'a>(&'a self, other: &'a Self) -> &'a Self

source

pub fn union<'a>(&'a self, other: &'a Self) -> &'a Self

source

pub fn hull(self, t: T) -> Self

source

pub fn dilate(self, delta: T) -> Self
where T: Add<Output = T>,

source

pub fn sup(&self) -> &T

source

pub fn closure(self) -> RightBounded<T, Inclusive>

source

pub fn floor(&self) -> T
where Bound<T, B>: Floor<T>,

use inter_val::{RightBounded, Inclusive, Exclusive};
let a : RightBounded<_, _> = Inclusive.at(7).into();
let b : RightBounded<_, _> = Exclusive.at(7).into();
let c : RightBounded<_, _> = Inclusive.at(4.56).into();
assert_eq!(a.floor(), 7);
assert_eq!(b.floor(), 6);
assert_eq!(c.floor(), 4.0);
source

pub fn interior(self) -> RightBounded<T, Exclusive>

Trait Implementations§

source§

impl<T: PartialOrd> RangeBounds<T> for RightBounded<T, Exclusive>

source§

fn start_bound(&self) -> Bound<&T>

Start index bound. Read more
source§

fn end_bound(&self) -> Bound<&T>

End index bound. Read more
1.35.0 · source§

fn contains<U>(&self, item: &U) -> bool
where T: PartialOrd<U>, U: PartialOrd<T> + ?Sized,

Returns true if item is contained in the range. Read more
source§

impl<T: PartialOrd> RangeBounds<T> for RightBounded<T, Inclusive>

source§

fn start_bound(&self) -> Bound<&T>

Start index bound. Read more
source§

fn end_bound(&self) -> Bound<&T>

End index bound. Read more
1.35.0 · source§

fn contains<U>(&self, item: &U) -> bool
where T: PartialOrd<U>, U: PartialOrd<T> + ?Sized,

Returns true if item is contained in the range. Read more