pub enum OutEvent<PI> {
SendMessage(PI, Message<PI>),
EmitEvent(TopicId, Event<PI>),
ScheduleTimer(Duration, Timer<PI>),
DisconnectPeer(PI),
PeerData(PI, PeerData),
}
Expand description
Output event from the protocol state.
Variants§
SendMessage(PI, Message<PI>)
Send a message on the network
EmitEvent(TopicId, Event<PI>)
Emit an event to the application.
ScheduleTimer(Duration, Timer<PI>)
Schedule a timer. The runtime is responsible for sending an InEvent::TimerExpired after the duration.
DisconnectPeer(PI)
Close the connection to a peer on the network level.
PeerData(PI, PeerData)
Updated peer data
Trait Implementations§
Auto Trait Implementations§
impl<PI> !Freeze for OutEvent<PI>
impl<PI> RefUnwindSafe for OutEvent<PI>where
PI: RefUnwindSafe,
impl<PI> Send for OutEvent<PI>where
PI: Send,
impl<PI> Sync for OutEvent<PI>where
PI: Sync,
impl<PI> Unpin for OutEvent<PI>where
PI: Unpin,
impl<PI> UnwindSafe for OutEvent<PI>where
PI: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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