Struct mz_ore::lgbytes::MetricsRegion
source · pub struct MetricsRegion<T: Copy> {
buf: Region<T>,
free_count: IntCounter,
free_capacity_bytes: IntCounter,
}
Available on crate features
bytes_
and region
only.Expand description
A Region wrapper that increments metrics when it is dropped.
The T: Copy
bound ensures that the Region
doesn’t leak resources when
dropped.
Fields§
§buf: Region<T>
§free_count: IntCounter
§free_capacity_bytes: IntCounter
Implementations§
source§impl<T: Copy> MetricsRegion<T>
impl<T: Copy> MetricsRegion<T>
fn capacity_bytes(&self) -> usize
Trait Implementations§
source§impl<T: Copy> Drop for MetricsRegion<T>
impl<T: Copy> Drop for MetricsRegion<T>
impl<T: Copy + Eq> Eq for MetricsRegion<T>
Auto Trait Implementations§
impl<T> Freeze for MetricsRegion<T>
impl<T> RefUnwindSafe for MetricsRegion<T>where
T: RefUnwindSafe,
impl<T> Send for MetricsRegion<T>where
T: Send,
impl<T> Sync for MetricsRegion<T>where
T: Sync,
impl<T> Unpin for MetricsRegion<T>where
T: Unpin,
impl<T> UnwindSafe for MetricsRegion<T>where
T: UnwindSafe,
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<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
Compare self to
key
and return true
if they are equal.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
Compare self to
key
and return true
if they are equal.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<T> ToHex for T
impl<T> ToHex for T
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)