pub fn unwrap_close(self) -> (u16, String) {
        match self {
            Self::Close(code, msg) => (code, msg),
            Self::Text(_) => panic!("Not a close message"),
        }
    }
/// 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].
Returns the contained [WsMessage::Close] value, consuming the `self` value.
Because this function may panic, its use is generally discouraged.
Returns the contained [ WsMessage :: Close ] value consuming the ` self ` value . Because this function may panic its use is generally discouraged .
pub fn unwrap_close(self) -> (u16, String) {
        match self {
            Self::Close(code, msg) => (code, msg),
            Self::Text(_) => panic!("Not a close message"),
        }
    }
pub fn unwrap_close ( self ) -> ( u16 , String ) { match self { Self :: Close ( code , msg ) => ( code , msg ) , Self :: Text ( _ ) => panic ! ( " " ) , } }
Returns the contained [WsMessage::Close] value, consuming the `self` value.
Returns the contained [ WsMessage :: Close ] value consuming the ` self ` value .
self
self
panics
Panics if the self value not equals [WsMessage::Close].
Panics if the self value not equals [ WsMessage :: Close ] .