Type Alias inter_val::LeftBounded

source ·
pub type LeftBounded<T, B> = HalfBounded<T, B, Left>;

Aliased Type§

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

Implementations§

source§

impl<T: PartialOrd, B: BoundaryOf<Left>> LeftBounded<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: Sub<Output = T>,

source

pub fn inf(&self) -> &T

source

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

source

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

source

pub fn ceil(&self) -> T
where Bound<T, B>: Ceil<T>,

use inter_val::{LeftBounded, Inclusive, Exclusive};
let a: LeftBounded<_, _> = Inclusive.at(4).into();
let b: LeftBounded<_, _> = Exclusive.at(4).into();
let c: LeftBounded<_, _> = Inclusive.at(1.23).into();
assert_eq!(a.ceil(), 4);
assert_eq!(b.ceil(), 5);
assert_eq!(c.ceil(), 2.0);

Trait Implementations§

source§

impl<T: PartialOrd> RangeBounds<T> for LeftBounded<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 LeftBounded<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