pub struct UnusableFills { /* private fields */ }Expand description
The fills a reader cannot use. Put one in a crate::CacheKey’s extensions
and crate::HttpCache::cache_lock_wait honours it. Empty waits as normal.
One set and one publisher per key: extensions hold one value per type, and each
WritePermit::publish supersedes the last, so two features on a key must agree
on a combined set. Distinct token ranges stop tokens colliding but the space is
still flat and shared.
A match costs the reader its caching – LockWaitOutcome::Abandoned means an
uncached fetch, where LockWaitOutcome::AgeTimeout recompetes and can still
cache. Name only fills that genuinely cannot be waited for.
Implementations§
Source§impl UnusableFills
impl UnusableFills
Sourcepub fn new(fills: impl Into<Arc<[UnusableFill]>>) -> Self
pub fn new(fills: impl Into<Arc<[UnusableFill]>>) -> Self
fills in precedence order: if several are published at once, the earliest
here is reported back.
Sourcepub fn fills(&self) -> &[UnusableFill]
pub fn fills(&self) -> &[UnusableFill]
The fills this reader cannot use, in precedence order.
Sourcepub fn first_match(&self, published: &[u64]) -> Option<UnusableFill>
pub fn first_match(&self, published: &[u64]) -> Option<UnusableFill>
Which of published this reader cannot use, or None to keep waiting. The
same function the wait uses, so a caller can check its token convention
against the real rule rather than a copy.
Trait Implementations§
Source§impl Clone for UnusableFills
impl Clone for UnusableFills
Source§fn clone(&self) -> UnusableFills
fn clone(&self) -> UnusableFills
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more