pub struct EvictPreview {
pub size_bytes: Option<u64>,
pub last_accessed_us_ago: Option<u64>,
pub pinned: bool,
pub already_evicted: bool,
pub origin_kinds: Vec<OriginKind>,
}Expand description
Pre-evict snapshot returned inside EvictResponse::preview.
Mirrors the cache engine’s EvictionPreview minus the
engine-internal served field (folded into
EvictResponse::was_present).
Fields§
§size_bytes: Option<u64>Bytes the iroh-blobs store reports for this hash, read straight
from the underlying store regardless of evicted-log state.
None when the blob isn’t in the store. A complete blob reports its
byte length. A partial blob (an interrupted or range pull) reports
the whole blob’s validated size once its last chunk has arrived, and
None before — not the bytes it holds on disk.
last_accessed_us_ago: Option<u64>Microseconds elapsed since the last recorded access to this hash: a
serve, a hit, or a fill. None when the hash has had no access since
the node started — including a blob on disk at start that nothing has
touched since — or when eviction or quarantine has cleared its entry.
pinned: boolWhether the hash is in the operator-pinned set (#276).
Pinning protects against LRU eviction but not against an
explicit admin_v1_evict; surfaced here so dry-run callers
can confirm policy state before issuing the real takedown.
already_evicted: boolWhether the hash is already in <cache_dir>/evicted.log.
true means a real admin_v1_evict would short-circuit
(idempotent re-run, no log line appended).
origin_kinds: Vec<OriginKind>Ordered list of origin backends the node would consult on a
post-eviction miss (#439, #284). Empty when the engine has no
origin configured (cache-only mode); a single-element vec is
the common single-origin case. Operators running DMCA takedowns or
LRU sweeps use this to estimate worst-case origin egress cost
— re-pulling from a Filesystem origin is a local read;
re-pulling through a chain of Http/S3 mirrors multiplies
the metered-bandwidth bill on a deep fallback.
skip_serializing_if = "Vec::is_empty" elides the field
entirely in cache-only mode, keeping the JSON output minimal;
default reads that elided field back as the empty list.
Trait Implementations§
Source§impl Clone for EvictPreview
impl Clone for EvictPreview
Source§impl Debug for EvictPreview
impl Debug for EvictPreview
Source§impl Default for EvictPreview
impl Default for EvictPreview
Source§impl<'de> Deserialize<'de> for EvictPreview
impl<'de> Deserialize<'de> for EvictPreview
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for EvictPreview
impl RefUnwindSafe for EvictPreview
impl Send for EvictPreview
impl Sync for EvictPreview
impl Unpin for EvictPreview
impl UnsafeUnpin for EvictPreview
impl UnwindSafe for EvictPreview
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<'de, T> BorrowedRpcObject<'de> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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