pub struct Step<P: OverlayProtocol + ?Sized> {
pub events: Vec<P::Event>,
pub messages: Vec<OutMessage<P>>,
}Expand description
The result of a protocol step: events emitted and messages to send.
Callers must process the returned Step — it contains outbound messages
that must be delivered and events that must be handled by the application.
Fields§
§events: Vec<P::Event>§messages: Vec<OutMessage<P>>Implementations§
Source§impl<P: OverlayProtocol + ?Sized> Step<P>
impl<P: OverlayProtocol + ?Sized> Step<P>
pub fn new() -> Self
pub fn with_event(self, event: P::Event) -> Self
pub fn with_message(self, message: OutMessage<P>) -> Self
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for Step<P>where
P: ?Sized,
impl<P> RefUnwindSafe for Step<P>where
<P as OverlayProtocol>::Event: RefUnwindSafe,
<P as OverlayProtocol>::Message: RefUnwindSafe,
<P as OverlayProtocol>::Address: RefUnwindSafe,
P: ?Sized,
impl<P> Send for Step<P>where
<P as OverlayProtocol>::Event: Send,
<P as OverlayProtocol>::Message: Send,
<P as OverlayProtocol>::Address: Send,
P: ?Sized,
impl<P> Sync for Step<P>where
<P as OverlayProtocol>::Event: Sync,
<P as OverlayProtocol>::Message: Sync,
<P as OverlayProtocol>::Address: Sync,
P: ?Sized,
impl<P> Unpin for Step<P>
impl<P> UnsafeUnpin for Step<P>where
P: ?Sized,
impl<P> UnwindSafe for Step<P>where
<P as OverlayProtocol>::Event: UnwindSafe,
<P as OverlayProtocol>::Message: UnwindSafe,
<P as OverlayProtocol>::Address: RefUnwindSafe,
P: ?Sized,
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