Implement MessageCapable trait methods in gateway
default module
This commit is contained in:
parent
29efae385e
commit
287b72c99c
|
@ -35,15 +35,18 @@ impl crate::gateway::MessageCapable for tokio_tungstenite::tungstenite::Message
|
|||
}
|
||||
|
||||
fn is_empty(&self) -> bool {
|
||||
todo!()
|
||||
match self {
|
||||
Message::Text(text) => text.is_empty(),
|
||||
Message::Binary(bytes) => bytes.is_empty(),
|
||||
_ => false,
|
||||
}
|
||||
|
||||
fn is_error(&self) -> bool {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn as_bytes(&self) -> Option<Vec<u8>> {
|
||||
todo!()
|
||||
match self {
|
||||
Message::Binary(bytes) => Some(bytes.clone()),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue