Skip to main content

PgWireServerHandlers

Trait PgWireServerHandlers 

Source
pub trait PgWireServerHandlers: 'static {
    // Provided methods
    fn simple_query_handler(&self) -> Arc<impl SimpleQueryHandler> { ... }
    fn extended_query_handler(&self) -> Arc<impl ExtendedQueryHandler> { ... }
    fn startup_handler(&self) -> Arc<impl StartupHandler> { ... }
    fn copy_handler(&self) -> Arc<impl CopyHandler> { ... }
    fn error_handler(&self) -> Arc<impl ErrorHandler> { ... }
    fn cancel_handler(&self) -> Arc<impl CancelHandler> { ... }
}
Expand description

A collection of all handler traits required to serve a PostgreSQL connection.

Implement this trait to provide handlers for each phase of the wire protocol.

Provided Methods§

Source

fn simple_query_handler(&self) -> Arc<impl SimpleQueryHandler>

Returns the handler for simple (text) queries.

Source

fn extended_query_handler(&self) -> Arc<impl ExtendedQueryHandler>

Returns the handler for extended query protocol messages.

Source

fn startup_handler(&self) -> Arc<impl StartupHandler>

Returns the handler for the startup/authentication phase.

Source

fn copy_handler(&self) -> Arc<impl CopyHandler>

Returns the handler for COPY sub-protocol messages.

Source

fn error_handler(&self) -> Arc<impl ErrorHandler>

Returns the error handler for processing errors before sending to the client.

Source

fn cancel_handler(&self) -> Arc<impl CancelHandler>

Returns the handler for cancel requests.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> PgWireServerHandlers for Arc<T>

Implementors§