pub struct ConnectionMetadata {
pub subprotocol: Option<String>,
pub extensions: Vec<String>,
pub established_at: Instant,
pub last_activity_at: Instant,
pub messages_sent: u64,
pub messages_received: u64,
pub bytes_sent: u64,
pub bytes_received: u64,
}Expand description
Connection metadata
Fields§
§subprotocol: Option<String>WebSocket subprotocol
extensions: Vec<String>WebSocket extensions
established_at: InstantConnection established time
last_activity_at: InstantLast activity time
messages_sent: u64Messages sent count
messages_received: u64Messages received count
bytes_sent: u64Bytes sent count
bytes_received: u64Bytes received count
Trait Implementations§
Source§impl Clone for ConnectionMetadata
impl Clone for ConnectionMetadata
Source§fn clone(&self) -> ConnectionMetadata
fn clone(&self) -> ConnectionMetadata
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 moreAuto Trait Implementations§
impl Freeze for ConnectionMetadata
impl RefUnwindSafe for ConnectionMetadata
impl Send for ConnectionMetadata
impl Sync for ConnectionMetadata
impl Unpin for ConnectionMetadata
impl UnwindSafe for ConnectionMetadata
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