#[non_exhaustive]pub enum MemoryBudgetConfig {
Auto,
Fraction(f64),
Limit(ByteSize),
}Expand description
Configured capacity for reservation-based pooled transfer data.
Requests that fit within the resolved capacity backpressure when capacity is unavailable. A single reservation larger than the resolved capacity is rejected. Unreserved acquisition and process or runtime overhead are outside this ceiling.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auto
Use up to one quarter of detected effective memory, capped at 32 GiB.
Effective memory includes process or container limits where the platform exposes them. The result may be rounded down to the pool’s allocation unit. If detection is unavailable, the pool uses 2 GiB.
Fraction(f64)
Use the given fraction of detected effective memory.
The fraction must be finite and in (0.0, 1.0]. This policy requires
memory detection and does not apply the automatic 32 GiB cap.
Limit(ByteSize)
An explicit byte limit that bypasses memory detection.
The resolved capacity never exceeds this value and may be smaller by
less than one platform allocation unit. Values too small to fund one
allocation unit are rejected. The resolved capacity is reported by
MemoryMetrics::capacity_bytes.
Trait Implementations§
Source§impl Clone for MemoryBudgetConfig
impl Clone for MemoryBudgetConfig
Source§impl Debug for MemoryBudgetConfig
impl Debug for MemoryBudgetConfig
Auto Trait Implementations§
impl Forget for MemoryBudgetConfig
impl Freeze for MemoryBudgetConfig
impl Move for MemoryBudgetConfig
impl RefUnwindSafe for MemoryBudgetConfig
impl Send for MemoryBudgetConfig
impl Sync for MemoryBudgetConfig
impl Unpin for MemoryBudgetConfig
impl UnsafeUnpin for MemoryBudgetConfig
impl UnwindSafe for MemoryBudgetConfig
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<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 more