pub struct ConnectionLimits { /* private fields */ }Expand description
Resolved connection-permit policy for disposable database leases.
The budget models downstream application connections. Each live database
lease reserves Self::connections_per_database permits, so the effective
lease limit is floor division and any remainder stays unused. Harness-owned
owner, template-coordination, and lifecycle-administration sessions are
separate from this application budget.
Implementations§
Source§impl ConnectionLimits
impl ConnectionLimits
Sourcepub const fn connection_budget(&self) -> usize
pub const fn connection_budget(&self) -> usize
Returns the total number of downstream-connection permits.
Sourcepub const fn connections_per_database(&self) -> u32
pub const fn connections_per_database(&self) -> u32
Returns the permits reserved by every live database lease.
This value should cover the sum of the maximum sizes of every application pool or standalone connection that one test can open.
Sourcepub const fn max_simultaneous_leases(&self) -> usize
pub const fn max_simultaneous_leases(&self) -> usize
Returns the effective maximum number of simultaneous database leases.
This is connection_budget / connections_per_database, rounded down.
Trait Implementations§
Source§impl Clone for ConnectionLimits
impl Clone for ConnectionLimits
Source§fn clone(&self) -> ConnectionLimits
fn clone(&self) -> ConnectionLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ConnectionLimits
Source§impl Debug for ConnectionLimits
impl Debug for ConnectionLimits
impl Eq for ConnectionLimits
Source§impl PartialEq for ConnectionLimits
impl PartialEq for ConnectionLimits
impl StructuralPartialEq for ConnectionLimits
Auto Trait Implementations§
impl Freeze for ConnectionLimits
impl RefUnwindSafe for ConnectionLimits
impl Send for ConnectionLimits
impl Sync for ConnectionLimits
impl Unpin for ConnectionLimits
impl UnsafeUnpin for ConnectionLimits
impl UnwindSafe for ConnectionLimits
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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>
T in a tonic::Request