pub enum PeerEvent {
Connected {
url: Arc<str>,
peer: Option<PeerIdentity>,
},
Lost {
url: Arc<str>,
cause: LossCause,
},
Retrying {
url: Arc<str>,
attempt: u32,
delay: Duration,
},
GaveUp {
url: Arc<str>,
why: GiveUp,
},
Missed(u64),
}Expand description
One transition of one dialled address, reported on
PeerEvents.
Variants§
Connected
The address has a live connection: after connect, and after every
successful redial.
Fields
§
peer: Option<PeerIdentity>What the peer proved, exactly as IncomingMeta::peer reports it.
Lost
The connection is gone, and why. The slot is down until Connected
or GaveUp follows.
Fields
Retrying
A redial is scheduled.
Fields
GaveUp
The slot will not be redialled again. The next operation that would have used it fails with the loss cause.
Missed(u64)
The reader fell behind by this many events, which were discarded.
The stream is bounded, so a reader that does not keep up learns how much it missed rather than growing a queue.
Trait Implementations§
impl Eq for PeerEvent
impl StructuralPartialEq for PeerEvent
Auto Trait Implementations§
impl Freeze for PeerEvent
impl RefUnwindSafe for PeerEvent
impl Send for PeerEvent
impl Sync for PeerEvent
impl Unpin for PeerEvent
impl UnsafeUnpin for PeerEvent
impl UnwindSafe for PeerEvent
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