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>
impl<T: PartialOrd, B: BoundaryOf<Left>> LeftBounded<T, B>
pub fn includes(&self, other: &Self) -> bool
pub fn contains(&self, t: &T) -> bool
pub fn intersection<'a>(&'a self, other: &'a Self) -> &'a Self
pub fn union<'a>(&'a self, other: &'a Self) -> &'a Self
pub fn hull(self, t: T) -> Self
pub fn dilate(self, delta: T) -> Selfwhere
T: Sub<Output = T>,
pub fn inf(&self) -> &T
pub fn closure(self) -> LeftBounded<T, Inclusive>
pub fn interior(self) -> LeftBounded<T, Exclusive>
sourcepub fn ceil(&self) -> Twhere
Bound<T, B>: Ceil<T>,
pub fn ceil(&self) -> Twhere
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);