pub struct Websocket {
pub key: String,
pub user_user: String,
/* private fields */
}
Fields§
§key: String
§user_user: String
Implementations§
Trait Implementations§
Source§impl Handler for Websocket
impl Handler for Websocket
fn on_frame(&mut self) -> Result<()>
Source§fn on_request(&mut self, _request: Request, _response: &mut Response)
fn on_request(&mut self, _request: Request, _response: &mut Response)
请求 处理
Source§fn on_options(&mut self, response: &mut Response)
fn on_options(&mut self, response: &mut Response)
预检请求处理 OPTIONS
Source§fn on_response(&mut self, request: Request, response: &mut Response)
fn on_response(&mut self, request: Request, response: &mut Response)
响应 处理
Source§fn on_shutdown(&mut self)
fn on_shutdown(&mut self)
关机监听
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