Skip to main content

ServerHooks

Trait ServerHooks 

Source
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§

Source

fn on_accept_error(&self, _err: &Error)

Source

fn on_connection_open(&self, _info: ConnectionInfo)

Source

fn on_connection_close(&self, _info: ConnectionInfo)

Source

fn on_command(&self, _id: u64, _command: &Command)

Source

fn on_protocol_error(&self, _err: &RespError)

Source

fn on_io_error(&self, _err: &Error)

Implementors§