pub enum Emit<Payload: DataLike> {
Immediate(Payload, usize),
Unordered(Payload, usize),
Ordered(Payload, usize),
ImmediateReplacement(fn(Option<Payload>) -> bool, Payload, usize),
UnorderedReplacement(fn(Option<Payload>) -> bool, Payload, usize),
OrderedReplacement(fn(Option<Payload>) -> bool, Payload, usize),
}Expand description
A message sent by an agent as part of an alternative action triggered by some event.
Variants§
Immediate(Payload, usize)
Send a message that will be delivered immediately, before any other message is delivered.
Unordered(Payload, usize)
Send an unordered message, which will be delivered at any order relative to the other unordered messages.
Ordered(Payload, usize)
Send an ordered message, which will be delivered after delivering all previous ordered messages from this source agent to the same target agent.
ImmediateReplacement(fn(Option<Payload>) -> bool, Payload, usize)
Send an immediate message that will replace the single in-flight message accepted by the
callback, or be created as a new message is the callback accepts None.
UnorderedReplacement(fn(Option<Payload>) -> bool, Payload, usize)
Send an unordered message that will replace the single in-flight message accepted by the
callback, or be created as a new message is the callback accepts None.
OrderedReplacement(fn(Option<Payload>) -> bool, Payload, usize)
Send an ordered message that will replace the single in-flight message accepted by the
callback, or be created as a new message is the callback accepts None.