pub trait ConnTriggers {
    fn on_connect(&self, conn: &Conn) -> Result<(), Error>;
    fn on_disconnect(&self);
    fn on_schema_reload(&self, conn: &Conn);
}
Expand description

Provides triggers for connect, disconnect and schema reload events.

Required Methods

Defines a trigger for execution when a new connection is established, and authentication and schema fetch are completed due to an event such as connect.

If the trigger execution fails and an exception happens, the connection’s state changes to error. In this case, the connection is terminated.

Define a trigger for execution after a connection is closed.

Define a trigger executed when some operation has been performed on the remote server after schema has been updated. So, if a server request fails due to a schema version mismatch error, schema reload is triggered.

Implementors