pub struct Sequence<T>{ /* private fields */ }Expand description
A module that stores a single value in the storage that can be read or incremented.
Implementations§
source§impl<T> Sequence<T>
impl<T> Sequence<T>
sourcepub fn get_current_value(&self) -> T
pub fn get_current_value(&self) -> T
Returns the current value of the sequence.
sourcepub fn next_value(&mut self) -> T
pub fn next_value(&mut self) -> T
Increments the value of the sequence and returns the new value.
Trait Implementations§
source§impl<T: Num + One + Zero + Default + Copy + ToBytes + FromBytes + CLTyped> ModuleComponent for Sequence<T>
impl<T: Num + One + Zero + Default + Copy + ToBytes + FromBytes + CLTyped> ModuleComponent for Sequence<T>
Implements the ModuleComponent trait for the Sequence struct.
impl<T: Num + One + Zero + Default + Copy + ToBytes + FromBytes + CLTyped> ModulePrimitive for Sequence<T>
Auto Trait Implementations§
impl<T> Freeze for Sequence<T>
impl<T> !RefUnwindSafe for Sequence<T>
impl<T> !Send for Sequence<T>
impl<T> !Sync for Sequence<T>
impl<T> Unpin for Sequence<T>where
T: Unpin,
impl<T> !UnwindSafe for Sequence<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more