Enum stateright::actor::Network
source · pub enum Network<Msg>where
Msg: Eq + Hash,{
UnorderedDuplicating(HashableHashSet<Envelope<Msg>>),
UnorderedNonDuplicating(HashableHashMap<Envelope<Msg>, usize>),
Ordered(BTreeMap<(Id, Id), VecDeque<Msg>>),
}
Expand description
Represents a network of messages.
Variants§
UnorderedDuplicating(HashableHashSet<Envelope<Msg>>)
Indicates that messages have no ordering (racing one another), and can be redelivered.
UnorderedNonDuplicating(HashableHashMap<Envelope<Msg>, usize>)
Indicates that messages have no ordering (racing one another), and will not be redelivered.
Ordered(BTreeMap<(Id, Id), VecDeque<Msg>>)
Indicates that directed message flows between pairs of actors are ordered. Does not indicate any ordering across different flows. Each direction for a pair of actors is a different flow.
See Also
The ordered_reliable_link
module partially implements this contract as long as actors do
not restart. A later version of the module and checker will account for actor restarts.
Implementations§
source§impl<Msg> Network<Msg>where
Msg: Eq + Hash,
impl<Msg> Network<Msg>where Msg: Eq + Hash,
sourcepub fn new_ordered(envelopes: impl IntoIterator<Item = Envelope<Msg>>) -> Self
pub fn new_ordered(envelopes: impl IntoIterator<Item = Envelope<Msg>>) -> Self
Indicates that directed message flows between pairs of actors are ordered. Does not indicate any ordering across different flows. Each direction for a pair of actors is a different flow.
See Also
The ordered_reliable_link
module partially implements this contract as long as actors do
not restart. A later version of the module and checker will account for actor restarts.
sourcepub fn new_unordered_duplicating(
envelopes: impl IntoIterator<Item = Envelope<Msg>>
) -> Self
pub fn new_unordered_duplicating( envelopes: impl IntoIterator<Item = Envelope<Msg>> ) -> Self
Indicates that messages have no ordering (racing one another), and can be redelivered.
See also: Self::new_unordered_nonduplicating
sourcepub fn new_unordered_nonduplicating(
envelopes: impl IntoIterator<Item = Envelope<Msg>>
) -> Self
pub fn new_unordered_nonduplicating( envelopes: impl IntoIterator<Item = Envelope<Msg>> ) -> Self
Indicates that messages have no ordering (racing one another), and will not be redelivered.
See also: Self::new_unordered_duplicating
sourcepub fn names() -> Vec<&'static str>
pub fn names() -> Vec<&'static str>
Returns a vector of names that can be parsed using FromStr
.
sourcepub fn iter_all(&self) -> NetworkIter<'_, Msg> ⓘ
pub fn iter_all(&self) -> NetworkIter<'_, Msg> ⓘ
Returns an iterator over all envelopes in the network.
sourcepub fn iter_deliverable(&self) -> NetworkDeliverableIter<'_, Msg> ⓘ
pub fn iter_deliverable(&self) -> NetworkDeliverableIter<'_, Msg> ⓘ
Returns an iterator over all distinct deliverable envelopes in the network.
Trait Implementations§
source§impl<Msg> Ord for Network<Msg>where
Msg: Eq + Hash + Ord,
impl<Msg> Ord for Network<Msg>where Msg: Eq + Hash + Ord,
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl<Msg> PartialEq<Network<Msg>> for Network<Msg>where
Msg: Eq + Hash + PartialEq,
impl<Msg> PartialEq<Network<Msg>> for Network<Msg>where Msg: Eq + Hash + PartialEq,
source§impl<Msg> PartialOrd<Network<Msg>> for Network<Msg>where
Msg: Eq + Hash + PartialOrd,
impl<Msg> PartialOrd<Network<Msg>> for Network<Msg>where Msg: Eq + Hash + PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<Msg> Rewrite<Id> for Network<Msg>where
Msg: Eq + Hash + Rewrite<Id>,
impl<Msg> Rewrite<Id> for Network<Msg>where Msg: Eq + Hash + Rewrite<Id>,
source§fn rewrite<S>(&self, plan: &RewritePlan<Id, S>) -> Self
fn rewrite<S>(&self, plan: &RewritePlan<Id, S>) -> Self
RewritePlan
.