pub struct Message<Payload: DataLike> {
pub order: MessageOrder,
pub source_index: usize,
pub target_index: usize,
pub payload: Payload,
pub replaced: Option<Payload>,
}
Expand description
A message in-flight between agents.
Fields§
§order: MessageOrder
How the message is ordered.
source_index: usize
The source agent index.
target_index: usize
The target agent index.
payload: Payload
The actual payload.
replaced: Option<Payload>
The replaced message, if any.
Trait Implementations§
Source§impl<Payload: Ord + DataLike> Ord for Message<Payload>
impl<Payload: Ord + DataLike> Ord for Message<Payload>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Payload: PartialOrd + DataLike> PartialOrd for Message<Payload>
impl<Payload: PartialOrd + DataLike> PartialOrd for Message<Payload>
impl<Payload: Copy + DataLike> Copy for Message<Payload>
impl<Payload: Eq + DataLike> Eq for Message<Payload>
impl<Payload: DataLike> StructuralPartialEq for Message<Payload>
Auto Trait Implementations§
impl<Payload> Freeze for Message<Payload>where
Payload: Freeze,
impl<Payload> RefUnwindSafe for Message<Payload>where
Payload: RefUnwindSafe,
impl<Payload> Send for Message<Payload>where
Payload: Send,
impl<Payload> Sync for Message<Payload>where
Payload: Sync,
impl<Payload> Unpin for Message<Payload>where
Payload: Unpin,
impl<Payload> UnwindSafe for Message<Payload>where
Payload: 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
Mutably borrows from an owned value. Read more