pub struct ResolvedServeEconomics {
pub policy: String,
pub discount_bps: u32,
pub n_max: u32,
pub warming_budget: u64,
pub warming_refill: u64,
}Expand description
Resolved refuse-to-serve economics tuning (ADR 041). See
ResolvedCache::serve_economics.
Fields§
§policy: StringRefuse-to-serve policy. "off" or "margin". Default
crate::config::DEFAULT_SERVE_ECONOMICS_POLICY.
discount_bps: u32Discount applied to the sell price when deciding whether a
speculative pull clears its margin gate, in basis points. Validated
to [1, 10_000] (5000 == 0.5). Default
crate::config::DEFAULT_SERVE_ECONOMICS_DISCOUNT_BPS.
n_max: u32Maximum number of concurrent speculative-warming sources. >= 1.
Default crate::config::DEFAULT_SERVE_ECONOMICS_N_MAX.
warming_budget: u64Per-source speculative-warming allowance, in payment base units.
> 0. Default
crate::config::DEFAULT_SERVE_ECONOMICS_WARMING_BUDGET.
warming_refill: u64Per-source allowance refill rate, in payment base units per second.
0 disables time-based refill. Default
crate::config::DEFAULT_SERVE_ECONOMICS_WARMING_REFILL.
Trait Implementations§
Source§impl Clone for ResolvedServeEconomics
impl Clone for ResolvedServeEconomics
Source§impl Debug for ResolvedServeEconomics
impl Debug for ResolvedServeEconomics
impl Eq for ResolvedServeEconomics
Source§impl PartialEq for ResolvedServeEconomics
impl PartialEq for ResolvedServeEconomics
impl StructuralPartialEq for ResolvedServeEconomics
Auto Trait Implementations§
impl Freeze for ResolvedServeEconomics
impl RefUnwindSafe for ResolvedServeEconomics
impl Send for ResolvedServeEconomics
impl Sync for ResolvedServeEconomics
impl Unpin for ResolvedServeEconomics
impl UnsafeUnpin for ResolvedServeEconomics
impl UnwindSafe for ResolvedServeEconomics
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§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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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