Struct inter_val::HalfBounded
source · pub struct HalfBounded<T, B, LR>(/* private fields */);Implementations§
source§impl<T, B, LR> HalfBounded<T, B, LR>
impl<T, B, LR> HalfBounded<T, B, LR>
pub fn cast<U: From<T>>(self) -> HalfBounded<U, B, LR>
source§impl<T: NumCast, B, LR> HalfBounded<T, B, LR>
impl<T: NumCast, B, LR> HalfBounded<T, B, LR>
pub fn try_cast<U: NumCast>(self) -> Option<HalfBounded<U, B, LR>>
source§impl<T: PartialOrd, B: BoundaryOf<Left>> HalfBounded<T, B, Left>
impl<T: PartialOrd, B: BoundaryOf<Left>> HalfBounded<T, B, Left>
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);source§impl<T: PartialOrd, B: BoundaryOf<Right>> HalfBounded<T, B, Right>
impl<T: PartialOrd, B: BoundaryOf<Right>> HalfBounded<T, B, Right>
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: Add<Output = T>,
pub fn sup(&self) -> &T
pub fn closure(self) -> RightBounded<T, Inclusive>
sourcepub fn floor(&self) -> Twhere
Bound<T, B>: Floor<T>,
pub fn floor(&self) -> Twhere
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);pub fn interior(self) -> RightBounded<T, Exclusive>
Trait Implementations§
source§impl<T: Clone, B: Clone, LR: Clone> Clone for HalfBounded<T, B, LR>
impl<T: Clone, B: Clone, LR: Clone> Clone for HalfBounded<T, B, LR>
source§fn clone(&self) -> HalfBounded<T, B, LR>
fn clone(&self) -> HalfBounded<T, B, LR>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<T, B, LR> Deref for HalfBounded<T, B, LR>
impl<T, B, LR> Deref for HalfBounded<T, B, LR>
source§impl<T, B, LR> DerefMut for HalfBounded<T, B, LR>
impl<T, B, LR> DerefMut for HalfBounded<T, B, LR>
source§impl<T, B, LR> From<Bound<T, B>> for HalfBounded<T, B, LR>
impl<T, B, LR> From<Bound<T, B>> for HalfBounded<T, B, LR>
source§impl<T: PartialEq, B: PartialEq, LR> PartialEq for HalfBounded<T, B, LR>
impl<T: PartialEq, B: PartialEq, LR> PartialEq for HalfBounded<T, B, LR>
source§impl<T: PartialOrd, B: BoundaryOf<LR>, LR> PartialOrd for HalfBounded<T, B, LR>
impl<T: PartialOrd, B: BoundaryOf<LR>, LR> PartialOrd for HalfBounded<T, B, LR>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl<T: Copy, B: Copy, LR: Copy> Copy for HalfBounded<T, B, LR>
impl<T: Eq, B: Eq, LR> Eq for HalfBounded<T, B, LR>
Auto Trait Implementations§
impl<T, B, LR> RefUnwindSafe for HalfBounded<T, B, LR>
impl<T, B, LR> Send for HalfBounded<T, B, LR>
impl<T, B, LR> Sync for HalfBounded<T, B, LR>
impl<T, B, LR> Unpin for HalfBounded<T, B, LR>
impl<T, B, LR> UnwindSafe for HalfBounded<T, B, LR>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more