pub struct Session {
pub sessionid: String,
pub status: Status,
pub configuration: StateSet,
pub history: History,
pub internal_queue: VecDeque<Event>,
pub invocations: Vec<Invocation>,
pub data_initialized: StateSet,
pub send_counter: u64,
pub invoke_counter: u64,
pub macrosteps: u64,
pub options: Options,
}Expand description
The state of one session, as a value.
The internal queue is part of the value: raise, send to #_internal and platform events
(error.*, done.state.*) feed it, while external events arrive only as Inputs, so
internal events are always processed before the next external one.
Fields§
§sessionid: String_sessionid.
status: StatusRunning or terminated.
configuration: StateSetActive states (never the root).
history: HistoryRecorded history values.
internal_queue: VecDeque<Event>The internal event queue.
invocations: Vec<Invocation>Started, not yet cancelled invocations.
data_initialized: StateSetStates whose data items have been initialized (late binding); the root is set at start.
send_counter: u64Counter for generated send identifiers.
invoke_counter: u64Counter for generated invoke identifiers.
macrosteps: u64Number of macrosteps completed.
options: OptionsOptions fixed at start.
Implementations§
Source§impl Session
impl Session
Sourcepub fn is_terminated(&self) -> bool
pub fn is_terminated(&self) -> bool
Whether the session has ended.
Sourcepub fn active(&self, chart: &CompiledChart) -> Vec<String>
pub fn active(&self, chart: &CompiledChart) -> Vec<String>
Active state identifiers in document order.
Sourcepub fn is_active(&self, chart: &CompiledChart, id: &str) -> bool
pub fn is_active(&self, chart: &CompiledChart, id: &str) -> bool
Whether the state with this identifier is active.