pub enum ConnectionEvent<C: Client> {
Established {
client: C,
},
Terminate {
client: C,
peaceful: bool,
},
Packet {
client: C,
bytes: Vec<u8>,
},
Error {
error: MailError,
},
}Expand description
Events which can occur during a connection.
Variants§
Established
A connection with a client was recently established.
Fields
§
client: CTerminate
A connection with a client was terminated (stopped). The peaceful field indicates if the stream was closed as the other machine may have crashed.
Packet
A packet was received from a client with the following bytes.
Error
An error occurred during processing.
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for ConnectionEvent<C>where
C: Freeze,
impl<C> !RefUnwindSafe for ConnectionEvent<C>
impl<C> Send for ConnectionEvent<C>
impl<C> Sync for ConnectionEvent<C>
impl<C> Unpin for ConnectionEvent<C>where
C: Unpin,
impl<C> !UnwindSafe for ConnectionEvent<C>
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