pub enum Event<'a> {
Ping(&'a [u8]),
Pong(&'a [u8]),
}
Expand description
Represent a websocket event, either Ping or Pong
A Ping frame may serve either as a keepalive or as a means to verify that the remote endpoint is still responsive.
A Pong frame sent in response to a Ping frame must have identical
“Application data” as found in the message body of the Ping frame being replied to.
A Pong frame MAY be sent unsolicited. This serves as a unidirectional heartbeat. A response to an unsolicited Pong frame is not expected.
Returns the slice of data contained within a Ping or Pong frame.
Performs copy-assignment from
source.
Read more
Formats the value using the given formatter.
Read more
Formats the value using the given formatter.
Read more
Encode websocket data frame.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.