pub struct CachePlan {
pub class: ConnectionClass,
pub budget_bytes: u64,
pub defer_bulk: bool,
}Expand description
What the client does with its cache and bulk transfers on one connection class.
Fields§
§class: ConnectionClassThe class the plan was made for.
budget_bytes: u64The reclaimable bytes retained before the sweep evicts.
defer_bulk: boolWhether bulk transfers (prefetch, original fetches, above-index uploads) wait for an
unmetered link. Everything but unmetered defers, as the networking table states for
metered and as the byte-conscious constrained, unreliable adverse and path-less
offline classes require.
Implementations§
Source§impl CachePlan
impl CachePlan
Sourcepub fn sweep_budget(&self) -> i64
pub fn sweep_budget(&self) -> i64
The budget in the signed width the sweep takes, saturating at i64::MAX.
Sourcepub fn upload_policy(&self, requested: UploadPolicy) -> UploadPolicy
pub fn upload_policy(&self, requested: UploadPolicy) -> UploadPolicy
The upload policy a push runs under on this plan, given the one the user requested.
A plan that defers bulk transfers demotes UploadPolicy::Full to
UploadPolicy::Staged, so the bulk tiers (preview and original) wait for an unmetered
link through the staged scheduler’s tier gate while the index tier still publishes the
asset. A plan that permits bulk work keeps whatever was requested.
Trait Implementations§
impl Copy for CachePlan
impl Eq for CachePlan
impl StructuralPartialEq for CachePlan
Auto Trait Implementations§
impl Freeze for CachePlan
impl RefUnwindSafe for CachePlan
impl Send for CachePlan
impl Sync for CachePlan
impl Unpin for CachePlan
impl UnsafeUnpin for CachePlan
impl UnwindSafe for CachePlan
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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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