pub struct EvictResponse {
pub was_present: bool,
pub dry_run: bool,
pub preview: EvictPreview,
}Expand description
Response body for admin_v1_evict.
Carries both the pre-evict snapshot (always populated, so an operator’s
audit log captures size and pin status at the moment of evict) and a
dry_run flag indicating whether the cache state was actually mutated.
Fields§
§was_present: boolWhether the hash would have been served by the cache before this
call (i.e. BlobStatus::Complete and not already evicted).
false means the evict was a no-op safety measure (blob never
cached, or already in evicted.log). For a real evict the
effect is durable; for a dry-run no effect is committed and the
was_present snapshot describes the current state only.
dry_run: booltrue when this response describes a dry-run preview — the
cache state was not mutated and only Self::preview is
meaningful. false means the eviction was applied per the
existing admin_v1_evict behaviour.
preview: EvictPreviewPre-evict snapshot of the blob’s local-cache state (#379).
Populated for both real and dry-run calls so an operator’s
audit log captures size and pin status at the moment of
evict. The struct is nested (rather than flattened into
Self) so the --dry-run view doesn’t push the bool count
past the clippy::struct_excessive_bools threshold and so a
future addition to the snapshot doesn’t churn the top-level
response shape.
Trait Implementations§
Source§impl Clone for EvictResponse
impl Clone for EvictResponse
Source§impl Debug for EvictResponse
impl Debug for EvictResponse
Source§impl Default for EvictResponse
impl Default for EvictResponse
Source§impl<'de> Deserialize<'de> for EvictResponse
impl<'de> Deserialize<'de> for EvictResponse
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 EvictResponse
impl RefUnwindSafe for EvictResponse
impl Send for EvictResponse
impl Sync for EvictResponse
impl Unpin for EvictResponse
impl UnsafeUnpin for EvictResponse
impl UnwindSafe for EvictResponse
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