Struct mz_pgwire_common::conn::ConnectionCounterInner
source · pub struct ConnectionCounterInner {
current: u64,
limit: u64,
superuser_reserved: u64,
}
Fields§
§current: u64
Current number of connections.
limit: u64
Total number of connections allowed.
superuser_reserved: u64
Number of connections in limit
we’ll reserve for superusers.
Implementations§
source§impl ConnectionCounterInner
impl ConnectionCounterInner
fn new(limit: u64, superuser_reserved: u64) -> Self
fn inc_connection_count(&mut self)
fn dec_connection_count(&mut self)
sourcefn reserved_remaining(&self) -> u64
fn reserved_remaining(&self) -> u64
The number of connections still available to superusers.
sourcefn non_reserved_remaining(&self) -> u64
fn non_reserved_remaining(&self) -> u64
The number of connections available to non-superusers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConnectionCounterInner
impl RefUnwindSafe for ConnectionCounterInner
impl Send for ConnectionCounterInner
impl Sync for ConnectionCounterInner
impl Unpin for ConnectionCounterInner
impl UnwindSafe for ConnectionCounterInner
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> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.