pub struct RuntimeState {
pub pos: usize,
}Expand description
State of a program runtime
RuntimeState contains information about the current state of a running program. It is used to store information that can be modified during program execution.
Can be used to change execution position at runtime.
Examples
let mut state = RuntimeState::default();
state.pos = 5; // modify current execution position
assert_eq!( state.pos, 5 );Fields§
§pos: usizecurrent execution position that can be changed by user
Trait Implementations§
source§impl Clone for RuntimeState
impl Clone for RuntimeState
source§fn clone(&self) -> RuntimeState
fn clone(&self) -> RuntimeState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for RuntimeState
impl Debug for RuntimeState
source§impl Default for RuntimeState
impl Default for RuntimeState
source§fn default() -> RuntimeState
fn default() -> RuntimeState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for RuntimeState
impl Send for RuntimeState
impl Sync for RuntimeState
impl Unpin for RuntimeState
impl UnwindSafe for RuntimeState
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