[−][src]Struct edit_common::simple_ws::SocketHandler
Methods
impl<S: SimpleSocket> SocketHandler<S>[src]
impl<S: SimpleSocket> SocketHandler<S>pub fn new(args: S::Args, out: Sender) -> SocketHandler<S>[src]
pub fn new(args: S::Args, out: Sender) -> SocketHandler<S>Trait Implementations
impl<S: SimpleSocket> Handler for SocketHandler<S>[src]
impl<S: SimpleSocket> Handler for SocketHandler<S>fn on_open(&mut self, shake: Handshake) -> Result<(), Error>[src]
fn on_open(&mut self, shake: Handshake) -> Result<(), Error>fn on_message(&mut self, msg: Message) -> Result<(), Error>[src]
fn on_message(&mut self, msg: Message) -> Result<(), Error>fn on_error(&mut self, _err: Error)[src]
fn on_error(&mut self, _err: Error)fn on_close(&mut self, _code: CloseCode, _reason: &str)[src]
fn on_close(&mut self, _code: CloseCode, _reason: &str)fn on_shutdown(&mut self)[src]
fn on_shutdown(&mut self)fn on_timeout(&mut self, event: Token) -> Result<()>[src]
fn on_timeout(&mut self, event: Token) -> Result<()>fn on_new_timeout(&mut self, event: Token, timeout: Timeout) -> Result<()>[src]
fn on_new_timeout(&mut self, event: Token, timeout: Timeout) -> Result<()>fn on_frame(&mut self, frame: Frame) -> Result<Option<Frame>>[src]
fn on_frame(&mut self, frame: Frame) -> Result<Option<Frame>>fn on_request(&mut self, req: &Request) -> Result<Response, Error>
fn on_request(&mut self, req: &Request) -> Result<Response, Error>A method for handling the low-level workings of the request portion of the WebSocket handshake. Read more
fn on_response(&mut self, res: &Response) -> Result<(), Error>
fn on_response(&mut self, res: &Response) -> Result<(), Error>A method for handling the low-level workings of the response portion of the WebSocket handshake. Read more
fn on_send_frame(&mut self, frame: Frame) -> Result<Option<Frame>, Error>
fn on_send_frame(&mut self, frame: Frame) -> Result<Option<Frame>, Error>A method for handling outgoing frames. Read more
fn build_request(&mut self, url: &Url) -> Result<Request, Error>
fn build_request(&mut self, url: &Url) -> Result<Request, Error>A method for creating the initial handshake request for WebSocket clients. Read more
Auto Trait Implementations
impl<S> Send for SocketHandler<S> where
S: Send,
<S as SimpleSocket>::Args: Send,
impl<S> Send for SocketHandler<S> where
S: Send,
<S as SimpleSocket>::Args: Send, impl<S> Sync for SocketHandler<S> where
S: Sync,
<S as SimpleSocket>::Args: Sync,
impl<S> Sync for SocketHandler<S> where
S: Sync,
<S as SimpleSocket>::Args: Sync, Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<F> Handler for F where
F: Fn(Message) -> Result<(), Error>,
impl<F> Handler for F where
F: Fn(Message) -> Result<(), Error>, fn on_message(&mut self, msg: Message) -> Result<(), Error>
fn on_message(&mut self, msg: Message) -> Result<(), Error>fn on_shutdown(&mut self)
fn on_shutdown(&mut self)Called when a request to shutdown all connections has been received.
fn on_open(&mut self, shake: Handshake) -> Result<(), Error>
fn on_open(&mut self, shake: Handshake) -> Result<(), Error>Called when the WebSocket handshake is successful and the connection is open for sending and receiving messages. Read more
fn on_close(&mut self, code: CloseCode, reason: &str)
fn on_close(&mut self, code: CloseCode, reason: &str)Called any time this endpoint receives a close control frame. This may be because the other endpoint is initiating a closing handshake, or it may be the other endpoint confirming the handshake initiated by this endpoint. Read more
fn on_error(&mut self, err: Error)
fn on_error(&mut self, err: Error)Called when an error occurs on the WebSocket.
fn on_request(&mut self, req: &Request) -> Result<Response, Error>
fn on_request(&mut self, req: &Request) -> Result<Response, Error>A method for handling the low-level workings of the request portion of the WebSocket handshake. Read more
fn on_response(&mut self, res: &Response) -> Result<(), Error>
fn on_response(&mut self, res: &Response) -> Result<(), Error>A method for handling the low-level workings of the response portion of the WebSocket handshake. Read more
fn on_timeout(&mut self, event: Token) -> Result<(), Error>
fn on_timeout(&mut self, event: Token) -> Result<(), Error>Called when a timeout is triggered. Read more
fn on_new_timeout(&mut self, Token, Timeout) -> Result<(), Error>
fn on_new_timeout(&mut self, Token, Timeout) -> Result<(), Error>Called when a timeout has been scheduled on the eventloop. Read more
fn on_frame(&mut self, frame: Frame) -> Result<Option<Frame>, Error>
fn on_frame(&mut self, frame: Frame) -> Result<Option<Frame>, Error>A method for handling incoming frames. Read more
fn on_send_frame(&mut self, frame: Frame) -> Result<Option<Frame>, Error>
fn on_send_frame(&mut self, frame: Frame) -> Result<Option<Frame>, Error>A method for handling outgoing frames. Read more
fn build_request(&mut self, url: &Url) -> Result<Request, Error>
fn build_request(&mut self, url: &Url) -> Result<Request, Error>A method for creating the initial handshake request for WebSocket clients. Read more