pub struct Websocket { /* private fields */ }
Implementations§
Source§impl Websocket
impl Websocket
pub fn new( config: Config, request: Request, response: Response, factory: fn(config: Config) -> Box<dyn Handler>, ) -> Self
pub fn send(&mut self, data: &JsonValue)
pub fn close(&mut self, code: CloseCode, reason: &str)
pub fn handle(&mut self, scheme: Scheme) -> Result<()>
pub fn get_key(&self) -> &str
pub fn get_version(&self) -> &str
Trait Implementations§
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