pub enum ServeAudit {
Serveable {
size: u64,
},
Unavailable {
withdrawn: bool,
},
}Expand description
Serve-path verdict for one hash, from a single store status() call.
Answers in one store contact what the delivery path asks in two —
CacheEngine::has for presence and CacheEngine::inspect for size
(#1789 item 7 part B). The variants are the delivery path’s own branches,
so a size is reachable only where it is serveable and a refusal can never
be paired with a wire size.
Variants§
Serveable
The store reports the blob complete and no gate refuses it (denied /
chain-denied / evicted) — the same condition CacheEngine::has
reports. size is the whole-blob wire size, and 0 means a genuinely
empty blob.
Nothing serveable from the local store: the blob is absent, partial, or refused by a gate.
Implementations§
Source§impl ServeAudit
impl ServeAudit
Sourcepub const fn hit_size(&self) -> Option<u64>
pub const fn hit_size(&self) -> Option<u64>
Wire size for a warm hit; None when the delivery path must fill and
then size the blob itself.
Sourcepub const fn is_serveable(&self) -> bool
pub const fn is_serveable(&self) -> bool
Whether the blob can be served from the local store right now.
Sourcepub const fn is_withdrawn(&self) -> bool
pub const fn is_withdrawn(&self) -> bool
Whether this node withdrew the hash: evicted or quarantined. false
for a serveable hash, since both are gates that refuse a serve.
Trait Implementations§
Source§impl Clone for ServeAudit
impl Clone for ServeAudit
Source§impl Debug for ServeAudit
impl Debug for ServeAudit
impl Eq for ServeAudit
Source§impl PartialEq for ServeAudit
impl PartialEq for ServeAudit
impl StructuralPartialEq for ServeAudit
Auto Trait Implementations§
impl Freeze for ServeAudit
impl RefUnwindSafe for ServeAudit
impl Send for ServeAudit
impl Sync for ServeAudit
impl Unpin for ServeAudit
impl UnsafeUnpin for ServeAudit
impl UnwindSafe for ServeAudit
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
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<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