Struct apis::session::Session
[−]
pub struct Session<CTX> where
CTX: Context, { /* fields omitted */ }
Methods
impl<CTX> Session<CTX> where
CTX: Context,
CTX: Context,
pub fn report_sizes() where
CTX: 'static,
CTX: 'static,
pub fn new(extended_state: ExtendedState<CTX>) -> Self
pub fn state(&self) -> &State
pub fn state_id(&self) -> StateId
pub fn extended_state(&self) -> &ExtendedState<CTX>
pub fn extended_state_mut(&mut self) -> &mut ExtendedState<CTX>
pub fn handle_event(
&mut self,
_event: Event
) -> Result<(), HandleEventException>
&mut self,
_event: Event
) -> Result<(), HandleEventException>
impl<CTX: Context> Session<CTX>
[src]
pub fn def(&self) -> &Def<CTX>
[src]
pub fn name(&self) -> &'static str
[src]
pub fn run(&mut self) -> VecMap<CTX::GPRES>
[src]
Creates a new session and runs to completion.
Transitions from Ready
to Running
, starts processes not already
running (those present in the process_handles
argument), waits for
results and finally transitions to Ended
.
pub fn run_with(
&mut self,
channels: VecMap<Channel<CTX>>,
process_handles: VecMap<Handle<CTX>>,
main_process: Option<Box<CTX::GPROC>>
) -> VecMap<CTX::GPRES>
[src]
&mut self,
channels: VecMap<Channel<CTX>>,
process_handles: VecMap<Handle<CTX>>,
main_process: Option<Box<CTX::GPROC>>
) -> VecMap<CTX::GPRES>
Run a session with given channels and handles to processes that are running in a continuation from a previous session.
Trait Implementations
impl<CTX> AsRef<ExtendedState<CTX>> for Session<CTX> where
CTX: Context,
CTX: Context,
fn as_ref(&self) -> &ExtendedState<CTX>
Performs the conversion.
impl<CTX> AsMut<ExtendedState<CTX>> for Session<CTX> where
CTX: Context,
CTX: Context,
fn as_mut(&mut self) -> &mut ExtendedState<CTX>
Performs the conversion.
impl<CTX> Drop for Session<CTX> where
CTX: Context,
CTX: Context,
impl<CTX> MachineDotfile for Session<CTX> where
CTX: Context,
CTX: Context,
fn name() -> &'static str
fn type_vars() -> Vec<String>
fn extended_state_names() -> Vec<&'static str>
fn extended_state_types() -> Vec<&'static str>
fn extended_state_defaults() -> Vec<&'static str>
fn self_reference() -> &'static str
fn states() -> Vec<&'static str>
fn state_initial() -> &'static str
fn state_terminal() -> &'static str
fn state_data_names() -> Vec<Vec<&'static str>>
fn state_data_types() -> Vec<Vec<&'static str>>
fn state_data_defaults() -> Vec<Vec<&'static str>>
fn state_data_pretty_defaults() -> Vec<Vec<String>>
This version does not evaluate expressions, only pretty prints them
fn events() -> Vec<&'static str>
fn event_sources() -> Vec<&'static str>
fn event_targets() -> Vec<&'static str>
fn event_actions() -> Vec<&'static str>
fn dotfile() -> String
Generate a DOT file for the state machine that hides default expressions for state fields and extended state fields Read more
fn dotfile_show_defaults() -> String
Generate a DOT file for the state machine that shows default expressions for state fields and extended state fields Read more
fn dotfile_pretty_defaults() -> String
Generate a DOT file for the state machine that pretty prints the values of default expressions for state fields and extended state fields. Read more
impl<CTX: Context> Debug for Session<CTX>
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more