Struct hotdrink_rs::model::Variable [−][src]
pub struct Variable<T> { /* fields omitted */ }
A variable that maintains its previous values.
Implementations
impl<T> Variable<T>
[src]
impl<T> Variable<T>
[src]pub fn new(value: T) -> Self
[src]
Constructs a new Variable
with the specified value.
pub fn set(&mut self, value: T)
[src]
Gives the variable a new value.
pub fn get(&self) -> &T
[src]
Returns a reference to the current value of the variable.
pub fn get_mut(&mut self) -> &mut T
[src]
Returns a mutable reference to the current value of the variable.
pub fn undo(&mut self) -> Result<(), NoMoreUndo>
[src]
Switches to the previous value of the variable.
pub fn redo(&mut self) -> Result<(), NoMoreRedo>
[src]
Switches to the next value of the variable.
Trait Implementations
impl<T> StructuralEq for Variable<T>
[src]
impl<T> StructuralEq for Variable<T>
[src]impl<T> StructuralPartialEq for Variable<T>
[src]
impl<T> StructuralPartialEq for Variable<T>
[src]Auto Trait Implementations
impl<T> RefUnwindSafe for Variable<T> where
T: RefUnwindSafe,
impl<T> RefUnwindSafe for Variable<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Variable<T> where
T: UnwindSafe,
impl<T> UnwindSafe for Variable<T> where
T: UnwindSafe,