pub enum OutEvent<PI> {
SendMessage(PI, Message<PI>),
EmitEvent(Event<PI>),
ScheduleTimer(Duration, Timer<PI>),
DisconnectPeer(PI),
PeerData(PI, PeerData),
}
Expand description
An output event from the state handler.
Variants§
SendMessage(PI, Message<PI>)
Send a message on the network
EmitEvent(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)
Emitted when new PeerData
was received for a peer.
Trait Implementations§
impl<PI: Eq> Eq for OutEvent<PI>
impl<PI> StructuralPartialEq for OutEvent<PI>
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.