Struct mz_ore::lgbytes::LgBytesOpMetrics
source · pub struct LgBytesOpMetrics { /* private fields */ }
Available on crate features
bytes_
and region
only.Expand description
Metrics for an individual usage of LgBytes.
Implementations§
source§impl LgBytesOpMetrics
impl LgBytesOpMetrics
sourcepub fn try_mmap<T: AsRef<[u8]>>(&self, buf: T) -> LgBytes
pub fn try_mmap<T: AsRef<[u8]>>(&self, buf: T) -> LgBytes
Attempts to copy the given buf into an lgalloc managed file-based mapped region, falling back to a heap allocation.
sourcepub fn try_mmap_region<T: Copy>(&self, buf: impl AsRef<[T]>) -> MetricsRegion<T>
pub fn try_mmap_region<T: Copy>(&self, buf: impl AsRef<[T]>) -> MetricsRegion<T>
Attempts to copy the given buf into an lgalloc managed file-based mapped region, falling back to a heap allocation.
sourcepub fn heap_region<T: Copy>(&self, buf: Vec<T>) -> MetricsRegion<T>
pub fn heap_region<T: Copy>(&self, buf: Vec<T>) -> MetricsRegion<T>
Wraps the already owned buf into a Region::Heap with metrics.
Besides metrics, this is essentially a no-op.
Trait Implementations§
source§impl Clone for LgBytesOpMetrics
impl Clone for LgBytesOpMetrics
source§fn clone(&self) -> LgBytesOpMetrics
fn clone(&self) -> LgBytesOpMetrics
Returns a copy 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 LgBytesOpMetrics
impl RefUnwindSafe for LgBytesOpMetrics
impl Send for LgBytesOpMetrics
impl Sync for LgBytesOpMetrics
impl Unpin for LgBytesOpMetrics
impl UnwindSafe for LgBytesOpMetrics
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