Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,26 @@ impl<'config> Runtime<'config> {
}
}

pub fn new_from_state(machine: Machine, context: Context, config: &'config Config) -> Self {
Self {
machine,
status: Ok(()),
return_data_buffer: Vec::new(),
context,
_config: config,
}
}

/// Get a reference to the machine.
pub fn machine(&self) -> &Machine {
&self.machine
}

/// Get a reference to the machine.
pub fn machine_mut(&mut self) -> &mut Machine {
&mut self.machine
}

/// Get a reference to the execution context.
pub fn context(&self) -> &Context {
&self.context
Expand Down