pub struct State {
pub entities: Map<Name, Entity>,
pub concepts: Map<Name, Concept>,
pub concepts_gtin: Map<Gtin, Concept>,
pub objects: Map<Name, Object>,
pub balances: Map<Pair, Value>,
}Expand description
An index of directly accessible actors.
§On being complete
Note that over time, actors might be come inaccessible as their names (or GTIN, in case of a concept) can be shadowed. In this case, they will never become accessible again. However, they will still be referred to when referenced elsewhere.
For example, take this script:
create concept C price 1€
create object O
create concept C price 2€After this script was ran,
object O still the former concept C with price 1€
as parent.
However, only the latter concept C with price 2€
can be referred to by its name.
Fields§
§entities: Map<Name, Entity>§concepts: Map<Name, Concept>§concepts_gtin: Map<Gtin, Concept>§objects: Map<Name, Object>§balances: Map<Pair, Value>Trait Implementations§
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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
Mutably borrows from an owned value. Read more
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
Compare self to
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>
Converts
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>
Converts
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