pub struct WebsocketEvent {
pub message: WsMessage,
/* private fields */
}
Fields§
§message: WsMessage
Implementations§
Methods from Deref<Target = Websocket>§
Sourcepub fn write(&self, data: Vec<u8>, opcode: u8)
pub fn write(&self, data: Vec<u8>, opcode: u8)
Write the data whose type is specified by the sceond parameter to peer
The method is thread safety
Sourcepub fn write_string(&self, s: &str)
pub fn write_string(&self, s: &str)
Conveniently to write string data to peer
The method is thread safety
Sourcepub fn write_binary(&self, data: Vec<u8>)
pub fn write_binary(&self, data: Vec<u8>)
Conveniently to write binary data to peer
The method is thread safety
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebsocketEvent
impl RefUnwindSafe for WebsocketEvent
impl Send for WebsocketEvent
impl Sync for WebsocketEvent
impl Unpin for WebsocketEvent
impl UnwindSafe for WebsocketEvent
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