pub struct BackendConfig {
pub host: String,
pub port: u16,
pub user: String,
pub password: Option<String>,
pub database: Option<String>,
pub application_name: Option<String>,
pub tls_mode: TlsMode,
pub connect_timeout: Duration,
pub query_timeout: Duration,
pub tls_config: Arc<ClientConfig>,
}Expand description
Backend connection parameters.
Fields§
§host: StringHostname (also used for TLS SNI).
port: u16TCP port.
user: StringPostgreSQL user.
password: Option<String>PostgreSQL password. If None, only AuthenticationOk (no
password required) is accepted.
database: Option<String>Target database. If None, connects to the user’s default.
application_name: Option<String>Application name reported via the application_name startup
parameter. Defaults to heliosdb-proxy when None.
tls_mode: TlsModeTLS policy.
connect_timeout: DurationConnect-timeout ceiling (covers DNS + TCP + TLS + startup).
query_timeout: DurationPer-query ceiling (round-trip from Query send to ReadyForQuery).
tls_config: Arc<ClientConfig>Shared rustls ClientConfig — build once via
super::tls::default_client_config and reuse across connections.
Implementations§
Trait Implementations§
Source§impl Clone for BackendConfig
impl Clone for BackendConfig
Source§fn clone(&self) -> BackendConfig
fn clone(&self) -> BackendConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BackendConfig
impl !RefUnwindSafe for BackendConfig
impl Send for BackendConfig
impl Sync for BackendConfig
impl Unpin for BackendConfig
impl UnsafeUnpin for BackendConfig
impl !UnwindSafe for BackendConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more