pub struct Websocket { /* private fields */ }
Implementations§
Source§impl Websocket
impl 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
Auto Trait Implementations§
impl Freeze for Websocket
impl RefUnwindSafe for Websocket
impl Send for Websocket
impl Sync for Websocket
impl Unpin for Websocket
impl UnwindSafe for Websocket
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