pub struct ConnectionEvent {
pub peer_id: String,
pub connected: bool,
}Expand description
A connection lifecycle event fired when a QUIC peer connection opens or closes.
Fields§
§peer_id: StringBase32-encoded public key of the peer.
connected: booltrue when this is the first connection from the peer (0→1), false when the last one closes (1→0).
Trait Implementations§
Source§impl Clone for ConnectionEvent
impl Clone for ConnectionEvent
Source§fn clone(&self) -> ConnectionEvent
fn clone(&self) -> ConnectionEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectionEvent
impl Debug for ConnectionEvent
Source§impl<'de> Deserialize<'de> for ConnectionEvent
impl<'de> Deserialize<'de> for ConnectionEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConnectionEvent
impl RefUnwindSafe for ConnectionEvent
impl Send for ConnectionEvent
impl Sync for ConnectionEvent
impl Unpin for ConnectionEvent
impl UnsafeUnpin for ConnectionEvent
impl UnwindSafe for ConnectionEvent
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