pub trait ServerHooks:
Send
+ Sync
+ 'static {
// Provided methods
fn on_accept_error(&self, _err: &Error) { ... }
fn on_connection_open(&self, _info: ConnectionInfo) { ... }
fn on_connection_close(&self, _info: ConnectionInfo) { ... }
fn on_command(&self, _id: u64, _command: &Command) { ... }
fn on_protocol_error(&self, _err: &RespError) { ... }
fn on_io_error(&self, _err: &Error) { ... }
}Expand description
Observability hooks for the server runtime.
Provided Methods§
fn on_accept_error(&self, _err: &Error)
fn on_connection_open(&self, _info: ConnectionInfo)
fn on_connection_close(&self, _info: ConnectionInfo)
fn on_command(&self, _id: u64, _command: &Command)
fn on_protocol_error(&self, _err: &RespError)
fn on_io_error(&self, _err: &Error)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".