pub trait Serial: PartialEq {
const START: Self;
// Required methods
fn next_increment(&self) -> Self;
fn prev_increment(&self) -> Self;
fn is_max_value(&self) -> bool;
}
Expand description
Defines how a type is used by SerialGenerator.
Required Associated Constants§
Required Methods§
Sourcefn next_increment(&self) -> Self
fn next_increment(&self) -> Self
Returns the next sequential value. Returns an equal value if it is at its maximum.
Sourcefn prev_increment(&self) -> Self
fn prev_increment(&self) -> Self
Returns the previous sequential value. Returns an equal value if it is at its minimum.
Sourcefn is_max_value(&self) -> bool
fn is_max_value(&self) -> bool
Returns a boolean representing whether the value is equal to its maximum.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.