pub struct DirectConnectionPolicy { /* private fields */ }Expand description
Immutable generated-package direct connection policy.
This value carries no caller-claimed server version. Each connection invocation validates its installed projection authority, captures one monotonic deadline, snapshots trust, and only then validates and copies credentials for the authoritative provider probe and exact-version gate.
Implementations§
Source§impl DirectConnectionPolicy
impl DirectConnectionPolicy
Sourcepub fn new(
endpoint: impl Into<String>,
database: impl Into<String>,
username: impl Into<String>,
password: impl Into<String>,
) -> DirectConnectionPolicy
pub fn new( endpoint: impl Into<String>, database: impl Into<String>, username: impl Into<String>, password: impl Into<String>, ) -> DirectConnectionPolicy
Construct a reusable policy with plaintext transport and common limits.
Sourcepub const fn http_port(self, http_port: u16) -> DirectConnectionPolicy
pub const fn http_port(self, http_port: u16) -> DirectConnectionPolicy
Set the authoritative HTTP version-probe port.
Sourcepub fn tls(self, tls: DirectTls) -> DirectConnectionPolicy
pub fn tls(self, tls: DirectTls) -> DirectConnectionPolicy
Set the closed TLS policy.
Sourcepub const fn connection_limits(
self,
limits: QueryExecutionResourceLimits,
) -> DirectConnectionPolicy
pub const fn connection_limits( self, limits: QueryExecutionResourceLimits, ) -> DirectConnectionPolicy
Tighten connection-time deadline and resource ceilings.
Sourcepub const fn answer_limits(
self,
limits: QueryExecutionResourceLimits,
) -> DirectConnectionPolicy
pub const fn answer_limits( self, limits: QueryExecutionResourceLimits, ) -> DirectConnectionPolicy
Tighten the immutable ceiling inherited by database operations.
Trait Implementations§
Source§impl Clone for DirectConnectionPolicy
impl Clone for DirectConnectionPolicy
Source§fn clone(&self) -> DirectConnectionPolicy
fn clone(&self) -> DirectConnectionPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DirectConnectionPolicy
impl RefUnwindSafe for DirectConnectionPolicy
impl Send for DirectConnectionPolicy
impl Sync for DirectConnectionPolicy
impl Unpin for DirectConnectionPolicy
impl UnsafeUnpin for DirectConnectionPolicy
impl UnwindSafe for DirectConnectionPolicy
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request