[][src]Trait serial_int::Serial

pub trait Serial where
    Self: Clone + Ord
{ pub const START: Self; pub fn next_increment(&self) -> Self;
pub fn prev_increment(&self) -> Self;
pub fn remaining_increments(&self) -> Self;
pub fn is_max_value(&self) -> bool; }

A trait that defines how a type is used by SerialGenerator.

Associated Constants

pub const START: Self[src]

The default initial and lowest possible value.

Loading content...

Required methods

pub fn next_increment(&self) -> Self[src]

Return the next sequential value. Return an equal value if it is at its maximum.

pub fn prev_increment(&self) -> Self[src]

Return the previous sequential value. Return an equal value if it is at its minimum.

pub fn remaining_increments(&self) -> Self[src]

👎 Deprecated since 0.3.0:

Please use is_max_value instead.

Return the number of times this value can be incremented before reaching its maximum, using Self to represent the count.

pub fn is_max_value(&self) -> bool[src]

Return a boolean representing whether the value is equal to its maximum.

Loading content...

Implementations on Foreign Types

impl Serial for u8[src]

impl Serial for u16[src]

impl Serial for u32[src]

impl Serial for u64[src]

impl Serial for u128[src]

impl Serial for usize[src]

Loading content...

Implementors

Loading content...