pub struct ConnectionHandler {
    pub config: CoreConfig,
    pub db_pool: Pool<PostgresConnectionManager<MakeTlsConnector>>,
    pub local_addr: SocketAddr,
    pub remote_addr: SocketAddr,
    pub tls_info: Option<TlsInfo>,
}
Expand description

ConnectionHandler

A date type containing the hyper Request with the CoreConfig server statics, tls information, and postgres client db threadpool (Pool)

Core Config

CoreConfig for static configuration values

bb8 Threadpool

bb8 thread pool (Pool) containing a PostgresConnectionManager client that encrypts the traffic with a MakeTlsConnector for db client tls encryption

Socket Data

local_addr - server address remote_addr - client address

TLS Info

TlsInfo object for tls verification (this is not optional with the default configuration).

Fields

config: CoreConfigdb_pool: Pool<PostgresConnectionManager<MakeTlsConnector>>local_addr: SocketAddrremote_addr: SocketAddrtls_info: Option<TlsInfo>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

call

Wrap a received hyper Request from the api server in a CoreTaskItem object and consume the CoreTaskItem with the handle_request function

Please refer to the hyper docs: call https://docs.rs/hyper/latest/hyper/service/trait.Service.html#tymethod.call

Arguments

Responses given by the service.

Errors produced by the service.

The future response value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more