pub struct DefaultErrorHandler;Expand description
This is a zero sized struct which calls eprintln!() and then breaks on error
Trait Implementations§
Source§impl ErrorHandler for DefaultErrorHandler
impl ErrorHandler for DefaultErrorHandler
Source§fn on_error(&mut self, error: WebSocketError) -> ControlFlow<(), Flow>
fn on_error(&mut self, error: WebSocketError) -> ControlFlow<(), Flow>
Callback whenever an unexpected error occurs during the event loop
Source§fn on_connect(
&mut self,
socket: &mut WebSocketStream,
) -> Result<(), WebSocketError>
fn on_connect( &mut self, socket: &mut WebSocketStream, ) -> Result<(), WebSocketError>
Callback run when the websocket connects or reconnects
Default behavior is to set the TCP socket to nonblocking Read more
Source§fn on_timeout(&mut self)
fn on_timeout(&mut self)
Callback run when the websocket connection times out without
receiving a message, default behavior is to sleep for half a second
Auto Trait Implementations§
impl Freeze for DefaultErrorHandler
impl RefUnwindSafe for DefaultErrorHandler
impl Send for DefaultErrorHandler
impl Sync for DefaultErrorHandler
impl Unpin for DefaultErrorHandler
impl UnsafeUnpin for DefaultErrorHandler
impl UnwindSafe for DefaultErrorHandler
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