Enum graphql_ws_client::Message
source · pub enum Message {
Text(String),
Close {
code: Option<u16>,
reason: Option<String>,
},
Ping,
Pong,
}
Expand description
A websocket message
Websocket client libraries usually provide their own version of this struct. The Connection trait for a given client should handle translation to & from this enum.
Variants§
Text(String)
A message containing the given text payload
Close
A message that closes the connection with the given code & reason
Fields
Ping
A ping
Pong
A reply to a ping
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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