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

type Constant: Constant[src]

The type of the bounding constant.

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.

Loading content...

Implementations on Foreign Types

impl Bound for i8[src]

Implementation of Bound for primitive integers.

Encodes strictness and boundedness within individual bits.

type Constant = i8

impl Bound for i16[src]

Implementation of Bound for primitive integers.

Encodes strictness and boundedness within individual bits.

type Constant = i16

impl Bound for i32[src]

Implementation of Bound for primitive integers.

Encodes strictness and boundedness within individual bits.

type Constant = i32

impl Bound for i64[src]

Implementation of Bound for primitive integers.

Encodes strictness and boundedness within individual bits.

type Constant = i64

impl Bound for i128[src]

Implementation of Bound for primitive integers.

Encodes strictness and boundedness within individual bits.

type Constant = i128

Loading content...

Implementors

impl<C: Constant> Bound for ConstantBound<C>[src]

type Constant = C

Loading content...