pub struct LoggingHandler { /* private fields */ }Expand description
Logging message handler
Implementations§
Trait Implementations§
Source§impl MessageHandler for LoggingHandler
impl MessageHandler for LoggingHandler
Source§fn on_message<'life0, 'async_trait>(
&'life0 mut self,
message: Message,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_message<'life0, 'async_trait>(
&'life0 mut self,
message: Message,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a received message
Source§fn on_connected<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_connected<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle connection established
Source§fn on_disconnected<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_disconnected<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle connection closed
Source§fn on_error<'life0, 'async_trait>(
&'life0 mut self,
error: WebSocketError,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_error<'life0, 'async_trait>(
&'life0 mut self,
error: WebSocketError,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle errors
Source§fn set_sender(&mut self, _sender: UnboundedSender<Message>)
fn set_sender(&mut self, _sender: UnboundedSender<Message>)
Set the sender for outgoing messages (optional, default implementation does nothing)
Source§fn send_message(&self, _message: Message) -> WebSocketResult<()>
fn send_message(&self, _message: Message) -> WebSocketResult<()>
Send a message through the WebSocket (optional, default implementation returns error)
Auto Trait Implementations§
impl Freeze for LoggingHandler
impl RefUnwindSafe for LoggingHandler
impl Send for LoggingHandler
impl Sync for LoggingHandler
impl Unpin for LoggingHandler
impl UnwindSafe for LoggingHandler
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