Trait CountsNonmotonically

Source
pub trait CountsNonmotonically {
    // Required methods
    fn can_inc(&self) -> bool;
    fn inc_one(&self);
    fn is_incrementable(&self) -> bool;
    fn is_at_increment_bound(&self) -> bool;
    fn is_within_increment_bound(&self) -> bool;
    fn can_dec(&self) -> bool;
    fn dec_one(&self);
    fn is_decrementable(&self) -> bool;
    fn is_at_decrement_bound(&self) -> bool;
    fn is_within_decrement_bound(&self) -> bool;
}
Expand description

Something that can counts up or down

Required Methods§

Source

fn can_inc(&self) -> bool

Can increment

Source

fn inc_one(&self)

Increment by one if possible

Source

fn is_incrementable(&self) -> bool

Is it incrementable based on internal counting behavior settings?

Source

fn is_at_increment_bound(&self) -> bool

Is it at the increment bound?

Source

fn is_within_increment_bound(&self) -> bool

Is it within the increment bound?

Source

fn can_dec(&self) -> bool

Can decrement

Source

fn dec_one(&self)

Decrement by one if possible

Source

fn is_decrementable(&self) -> bool

Is it incrementable based on internal counting behavior settings?

Source

fn is_at_decrement_bound(&self) -> bool

Is it at the decrement bound?

Source

fn is_within_decrement_bound(&self) -> bool

Is it within the decrement bound?

Implementations on Foreign Types§

Source§

impl<C> CountsNonmotonically for &C

Implementors§