pub struct Ping<T>(pub T);
Expand description
A Ping frame may serve either as a keepalive or as a means to verify that the remote endpoint is still responsive.
It is used to send ping frame.
let mut ws = WebSocket::client(get_stream().await);
ws.send(Ping("Hello!")).await;
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 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.