pub enum Action<T: System> {
Send {
destination: T::NodeId,
message: ProtocolMessage<T>,
},
Deliver {
message: Message<T>,
},
}
Expand description
Actions instructed by Plumtree Node.
For running Plumtree nodes, the actions must be handled correctly by upper layers.
Variants§
Send
Send a message.
If it is failed to send the message (e.g., the destination node does not exist), the message will be discarded silently.
Fields
§
message: ProtocolMessage<T>
The outgoing message.
Deliver
Deliver a message to the applications waiting for messages.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Action<T>
impl<T> RefUnwindSafe for Action<T>where
<T as System>::NodeId: RefUnwindSafe,
<T as System>::MessageId: RefUnwindSafe,
<T as System>::MessagePayload: RefUnwindSafe,
impl<T> Send for Action<T>
impl<T> Sync for Action<T>
impl<T> Unpin for Action<T>
impl<T> UnwindSafe for Action<T>where
<T as System>::NodeId: UnwindSafe,
<T as System>::MessageId: UnwindSafe,
<T as System>::MessagePayload: 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