pub struct ChannelSystemRun<'def> { /* private fields */ }Expand description
Representation of a CS that can be executed transition-by-transition.
The structure of the CS cannot be changed,
meaning that it is not possible to introduce new PGs or modifying them, or add new channels.
Though, this restriction makes it so that cloning the ChannelSystem is cheap,
because only the internal state needs to be duplicated.
Implementations§
Source§impl<'def> ChannelSystemRun<'def>
impl<'def> ChannelSystemRun<'def>
Sourcepub fn possible_transitions(
&self,
) -> impl Iterator<Item = (PgId, Action, impl Iterator<Item = impl Iterator<Item = Location> + '_> + '_)> + '_
pub fn possible_transitions( &self, ) -> impl Iterator<Item = (PgId, Action, impl Iterator<Item = impl Iterator<Item = Location> + '_> + '_)> + '_
Iterates over all transitions that can be admitted in the current state.
An admissible transition is characterized by the PG it executes on, the required action and the post-state (the pre-state being necessarily the current state of the machine). The (eventual) guard is guaranteed to be satisfied.
See also ProgramGraphRun::possible_transitions.
Sourcepub fn transition(
&mut self,
pg_id: PgId,
action: Action,
post: &[Location],
) -> Result<Option<Event>, CsError>
pub fn transition( &mut self, pg_id: PgId, action: Action, post: &[Location], ) -> Result<Option<Event>, CsError>
Executes a transition on the given PG characterized by the argument action and post-state.
Fails if the requested transition is not admissible.
See also ProgramGraphRun::transition.
Trait Implementations§
Source§impl<'def> Clone for ChannelSystemRun<'def>
impl<'def> Clone for ChannelSystemRun<'def>
Source§fn clone(&self) -> ChannelSystemRun<'def>
fn clone(&self) -> ChannelSystemRun<'def>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'def> Freeze for ChannelSystemRun<'def>
impl<'def> RefUnwindSafe for ChannelSystemRun<'def>
impl<'def> Send for ChannelSystemRun<'def>
impl<'def> Sync for ChannelSystemRun<'def>
impl<'def> Unpin for ChannelSystemRun<'def>
impl<'def> UnsafeUnpin for ChannelSystemRun<'def>
impl<'def> UnwindSafe for ChannelSystemRun<'def>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more