#[non_exhaustive]pub struct TaskStoreUsage {
pub task_count: usize,
pub retained_bytes: usize,
pub reserved_bytes: usize,
}Expand description
Content-free resource gauges for MemoryTaskStore.
reserved_bytes is headroom held for replacing every live record with a
small, fixed retention-limit failure. The aggregate quota applies to
retained_bytes + reserved_bytes; the split lets operators distinguish
actual stored payload from safety headroom without exposing task contents.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.task_count: usizeNumber of task records physically retained, including tombstones.
retained_bytes: usizeCompact-JSON bytes currently charged to retained task payloads.
reserved_bytes: usizeBytes reserved for bounded terminal retention failures.
Implementations§
Source§impl TaskStoreUsage
impl TaskStoreUsage
Sourcepub fn charged_bytes(self) -> usize
pub fn charged_bytes(self) -> usize
Aggregate bytes charged against TaskRetentionLimits::max_retained_bytes.
Snapshots returned by MemoryTaskStore::usage cannot overflow. This
accessor saturates only if a caller manually mutates the public gauge
fields into a value no store can produce.
Trait Implementations§
Source§impl Clone for TaskStoreUsage
impl Clone for TaskStoreUsage
Source§fn clone(&self) -> TaskStoreUsage
fn clone(&self) -> TaskStoreUsage
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 TaskStoreUsage
Source§impl Debug for TaskStoreUsage
impl Debug for TaskStoreUsage
Source§impl Default for TaskStoreUsage
impl Default for TaskStoreUsage
Source§fn default() -> TaskStoreUsage
fn default() -> TaskStoreUsage
impl Eq for TaskStoreUsage
Source§impl PartialEq for TaskStoreUsage
impl PartialEq for TaskStoreUsage
impl StructuralPartialEq for TaskStoreUsage
Auto Trait Implementations§
impl Freeze for TaskStoreUsage
impl RefUnwindSafe for TaskStoreUsage
impl Send for TaskStoreUsage
impl Sync for TaskStoreUsage
impl Unpin for TaskStoreUsage
impl UnsafeUnpin for TaskStoreUsage
impl UnwindSafe for TaskStoreUsage
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.