Trait clock_zones::Bound [−][src]
pub trait Bound: Clone { type Constant: Constant;}Show methods
fn max_constant() -> Option<Self::Constant>; fn min_constant() -> Option<Self::Constant>; fn unbounded() -> Self; fn le_zero() -> Self; fn lt_zero() -> Self; fn new(is_strict: bool, constant: Self::Constant) -> Self; fn new_le(constant: Self::Constant) -> Self; fn new_lt(constant: Self::Constant) -> Self; fn is_strict(&self) -> bool; fn is_unbounded(&self) -> bool; fn constant(&self) -> Option<Self::Constant>; fn add(&self, other: &Self) -> Option<Self>; fn is_tighter_than(&self, other: &Self) -> bool;
Represents a bound.
Associated Types
Loading content...Required methods
fn max_constant() -> Option<Self::Constant>
[src]
The maximal value of the bounding constant if it exists.
fn min_constant() -> Option<Self::Constant>
[src]
The minimal value of the bounding constant if it exists.
fn unbounded() -> Self
[src]
Returns the unbounded bound, i.e., < ∞
.
fn le_zero() -> Self
[src]
Returns the bound for ≤ 0
.
fn lt_zero() -> Self
[src]
Returns the bound for < 0
.
fn new(is_strict: bool, constant: Self::Constant) -> Self
[src]
Constructs a new bound.
fn new_le(constant: Self::Constant) -> Self
[src]
Constructs a new bound ≤ constant
.
fn new_lt(constant: Self::Constant) -> Self
[src]
Constructs a new bound < constant
.
fn is_strict(&self) -> bool
[src]
Returns whether the bound is strict.
fn is_unbounded(&self) -> bool
[src]
Returns whether the bound is the unbounded bound.
fn constant(&self) -> Option<Self::Constant>
[src]
Retrieves the constant associated with the bound.
If the bound is the unbounded bound, None will be returned.
fn add(&self, other: &Self) -> Option<Self>
[src]
Constructs a new bound by adding the constants of both bounds.
Returns None if adding the constants will lead to an overflow.
fn is_tighter_than(&self, other: &Self) -> bool
[src]
Returns whether self
is a tighter bound than other
.
Implementations on Foreign Types
impl Bound for i8
[src]
impl Bound for i8
[src]Implementation of Bound for primitive integers.
Encodes strictness and boundedness within individual bits.
type Constant = i8
fn max_constant() -> Option<Self::Constant>
[src]
fn min_constant() -> Option<Self::Constant>
[src]
fn unbounded() -> Self
[src]
fn le_zero() -> Self
[src]
fn lt_zero() -> Self
[src]
fn new(is_strict: bool, constant: Self::Constant) -> Self
[src]
fn new_le(constant: Self::Constant) -> Self
[src]
fn new_lt(constant: Self::Constant) -> Self
[src]
fn is_strict(&self) -> bool
[src]
fn is_unbounded(&self) -> bool
[src]
fn constant(&self) -> Option<Self::Constant>
[src]
fn add(&self, other: &Self) -> Option<Self>
[src]
fn is_tighter_than(&self, other: &Self) -> bool
[src]
impl Bound for i16
[src]
impl Bound for i16
[src]Implementation of Bound for primitive integers.
Encodes strictness and boundedness within individual bits.
type Constant = i16
fn max_constant() -> Option<Self::Constant>
[src]
fn min_constant() -> Option<Self::Constant>
[src]
fn unbounded() -> Self
[src]
fn le_zero() -> Self
[src]
fn lt_zero() -> Self
[src]
fn new(is_strict: bool, constant: Self::Constant) -> Self
[src]
fn new_le(constant: Self::Constant) -> Self
[src]
fn new_lt(constant: Self::Constant) -> Self
[src]
fn is_strict(&self) -> bool
[src]
fn is_unbounded(&self) -> bool
[src]
fn constant(&self) -> Option<Self::Constant>
[src]
fn add(&self, other: &Self) -> Option<Self>
[src]
fn is_tighter_than(&self, other: &Self) -> bool
[src]
impl Bound for i32
[src]
impl Bound for i32
[src]Implementation of Bound for primitive integers.
Encodes strictness and boundedness within individual bits.
type Constant = i32
fn max_constant() -> Option<Self::Constant>
[src]
fn min_constant() -> Option<Self::Constant>
[src]
fn unbounded() -> Self
[src]
fn le_zero() -> Self
[src]
fn lt_zero() -> Self
[src]
fn new(is_strict: bool, constant: Self::Constant) -> Self
[src]
fn new_le(constant: Self::Constant) -> Self
[src]
fn new_lt(constant: Self::Constant) -> Self
[src]
fn is_strict(&self) -> bool
[src]
fn is_unbounded(&self) -> bool
[src]
fn constant(&self) -> Option<Self::Constant>
[src]
fn add(&self, other: &Self) -> Option<Self>
[src]
fn is_tighter_than(&self, other: &Self) -> bool
[src]
impl Bound for i64
[src]
impl Bound for i64
[src]Implementation of Bound for primitive integers.
Encodes strictness and boundedness within individual bits.
type Constant = i64
fn max_constant() -> Option<Self::Constant>
[src]
fn min_constant() -> Option<Self::Constant>
[src]
fn unbounded() -> Self
[src]
fn le_zero() -> Self
[src]
fn lt_zero() -> Self
[src]
fn new(is_strict: bool, constant: Self::Constant) -> Self
[src]
fn new_le(constant: Self::Constant) -> Self
[src]
fn new_lt(constant: Self::Constant) -> Self
[src]
fn is_strict(&self) -> bool
[src]
fn is_unbounded(&self) -> bool
[src]
fn constant(&self) -> Option<Self::Constant>
[src]
fn add(&self, other: &Self) -> Option<Self>
[src]
fn is_tighter_than(&self, other: &Self) -> bool
[src]
impl Bound for i128
[src]
impl Bound for i128
[src]Implementation of Bound for primitive integers.
Encodes strictness and boundedness within individual bits.
type Constant = i128
fn max_constant() -> Option<Self::Constant>
[src]
fn min_constant() -> Option<Self::Constant>
[src]
fn unbounded() -> Self
[src]
fn le_zero() -> Self
[src]
fn lt_zero() -> Self
[src]
fn new(is_strict: bool, constant: Self::Constant) -> Self
[src]
fn new_le(constant: Self::Constant) -> Self
[src]
fn new_lt(constant: Self::Constant) -> Self
[src]
fn is_strict(&self) -> bool
[src]
fn is_unbounded(&self) -> bool
[src]
fn constant(&self) -> Option<Self::Constant>
[src]
fn add(&self, other: &Self) -> Option<Self>
[src]
fn is_tighter_than(&self, other: &Self) -> bool
[src]
Implementors
impl<C: Constant> Bound for ConstantBound<C>
[src]
impl<C: Constant> Bound for ConstantBound<C>
[src]