pub struct State<V> { /* private fields */ }Expand description
A state of an automaton network.
Every state keeps track of the locations the automata of the network are in, the values of the global variables, and a potentially infinite set of clock valuations using the respective TimeType.
Implementations§
Source§impl<V> State<V>
impl<V> State<V>
Sourcepub fn get_location_of<'e, T: TimeType>(
&self,
explorer: &'e Explorer<T>,
automaton_name: &str,
) -> &'e String
pub fn get_location_of<'e, T: TimeType>( &self, explorer: &'e Explorer<T>, automaton_name: &str, ) -> &'e String
Returns the name of the location the automaton with the provided name is in.
Panics in case the state has not been produced by the provided explorer or there is no automaton with the provided name in the automaton network.
Sourcepub fn get_global_value<T: TimeType>(
&self,
explorer: &Explorer<T>,
identifier: &str,
) -> &Value
pub fn get_global_value<T: TimeType>( &self, explorer: &Explorer<T>, identifier: &str, ) -> &Value
Returns the value of the provided global variable.
Panics in case the state has not been produced by the provided explorer or there is no global variable with the provided name in the automaton network.
Sourcepub fn get_transient_value(&self, network: &Network, identifier: &str) -> &Value
pub fn get_transient_value(&self, network: &Network, identifier: &str) -> &Value
Returns the value of the provided transient variable.
Panics in case the state has not been produced by the provided explorer or there is no transient variable with the provided name in the automaton network.
Sourcepub fn valuations(&self) -> &V
pub fn valuations(&self) -> &V
Returns the clock valuations associated with the state.
Trait Implementations§
Source§impl<'de, V> Deserialize<'de> for State<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for State<V>where
V: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl<V: Eq> Eq for State<V>
impl<V> StructuralPartialEq for State<V>
Auto Trait Implementations§
impl<V> Freeze for State<V>where
V: Freeze,
impl<V> RefUnwindSafe for State<V>where
V: RefUnwindSafe,
impl<V> Send for State<V>where
V: Send,
impl<V> Sync for State<V>where
V: Sync,
impl<V> Unpin for State<V>where
V: Unpin,
impl<V> UnwindSafe for State<V>where
V: UnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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