Enum async_graphql::http::WsMessage
source · Expand description
An enum representing the various forms of a WebSocket message.
Variants§
Implementations§
source§impl WsMessage
impl WsMessage
sourcepub fn unwrap_text(self) -> String
pub fn unwrap_text(self) -> String
Returns the contained WsMessage::Text value, consuming the self
value.
Because this function may panic, its use is generally discouraged.
Panics
Panics if the self value not equals WsMessage::Text.
sourcepub fn unwrap_close(self) -> (u16, String)
pub fn unwrap_close(self) -> (u16, String)
Returns the contained WsMessage::Close value, consuming the self
value.
Because this function may panic, its use is generally discouraged.
Panics
Panics if the self value not equals WsMessage::Close.