pub struct LoggingHandler;Expand description
A no-op handler that logs messages.
Trait Implementations§
Source§impl Clone for LoggingHandler
impl Clone for LoggingHandler
Source§fn clone(&self) -> LoggingHandler
fn clone(&self) -> LoggingHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoggingHandler
impl Debug for LoggingHandler
Source§impl Default for LoggingHandler
impl Default for LoggingHandler
Source§fn default() -> LoggingHandler
fn default() -> LoggingHandler
Returns the “default value” for a type. Read more
Source§impl WebSocketHandler for LoggingHandler
impl WebSocketHandler for LoggingHandler
Source§fn on_connect<'life0, 'life1, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_connect<'life0, 'life1, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when a new client connects. Read more
Source§fn on_message<'life0, 'life1, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
message: Message,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_message<'life0, 'life1, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
message: Message,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when a message is received from a client. Read more
Source§fn on_disconnect<'life0, 'life1, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_disconnect<'life0, 'life1, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when a client disconnects. Read more
Source§fn on_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
error: &'life2 WebSocketError,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
error: &'life2 WebSocketError,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when an error occurs on a connection. Read more
Source§fn on_ping<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
payload: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_ping<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
payload: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a ping is received. Return the pong payload. Read more
Source§fn on_pong<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
payload: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_pong<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection_id: &'life1 str,
payload: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a pong is received. Read more
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