Trait kernel::utilities::cells::NumericCellExt
source · pub trait NumericCellExt<T>{
// Required methods
fn add(&self, val: T);
fn subtract(&self, val: T);
fn increment(&self);
fn decrement(&self);
fn get_and_increment(&self) -> T;
fn get_and_decrement(&self) -> T;
}
Required Methods§
sourcefn get_and_increment(&self) -> T
fn get_and_increment(&self) -> T
Return the current value and then add 1 to the stored value.
sourcefn get_and_decrement(&self) -> T
fn get_and_decrement(&self) -> T
Return the current value and then subtract 1 from the stored value.