pub enum VCLEvent {
Connected,
Disconnected,
PacketReceived {
sequence: u64,
size: usize,
},
PingReceived,
PongReceived {
latency: Duration,
},
KeyRotated,
Error(String),
}Expand description
Events emitted by VCLConnection.
Subscribe via connection.subscribe() to receive an async channel.
Variants§
Connected
Handshake completed — connection is ready
Disconnected
Connection was closed (via close())
PacketReceived
A data packet was received
PingReceived
Peer sent us a Ping — we responded with Pong automatically
PongReceived
Pong received in response to our ping, with measured round-trip latency
KeyRotated
Key rotation completed successfully (both sides switched to new key)
Error(String)
A non-fatal error occurred internally
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VCLEvent
impl RefUnwindSafe for VCLEvent
impl Send for VCLEvent
impl Sync for VCLEvent
impl Unpin for VCLEvent
impl UnsafeUnpin for VCLEvent
impl UnwindSafe for VCLEvent
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