pub struct Connection {
pub stream: Box<dyn ReadWrite + Send>,
pub metadata: Option<ConnectionMetadata>,
}Expand description
Represents a connection to a single client
Fields§
§stream: Box<dyn ReadWrite + Send>Stream used for communication with the client
metadata: Option<ConnectionMetadata>Metadata associated with the connection that might be useful elsewhere (i.e. authentication, etc)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl !Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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