pub enum RawTCPResponse {
Message(Vec<u8>),
CloseConnection,
StopServer,
}
Expand description
Response returned by message handlers to indicate which action to take.
Variants§
Message(Vec<u8>)
Causes the server to send the given response message back to the client.
CloseConnection
Instructs the server to close the connection. To avoid that the client receives an error because the connection was closed, this will also send an empty response back to the client.
StopServer
Causes the server to stop. To avoid that the client receives an error because the connection was closed, this will also send an empty response back to the client.
Trait Implementations§
Source§impl Clone for RawTCPResponse
impl Clone for RawTCPResponse
Source§fn clone(&self) -> RawTCPResponse
fn clone(&self) -> RawTCPResponse
Returns a copy 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 RawTCPResponse
impl RefUnwindSafe for RawTCPResponse
impl Send for RawTCPResponse
impl Sync for RawTCPResponse
impl Unpin for RawTCPResponse
impl UnwindSafe for RawTCPResponse
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