Struct CacheMetadata
pub struct CacheMetadata { /* private fields */ }Expand description
A validated cache entry with its associated metadata.
This struct represents a cache entry that has been validated and is ready for use. It holds the cache entry’s path, revision number, and optional SHA256 hash.
Note: Concurrent access is coordinated via the global cache lock mechanism
(see CacheGlobalLock). Individual cache entries do not hold locks.
Implementations§
§impl CacheMetadata
impl CacheMetadata
pub fn revision(&self) -> u64
pub fn revision(&self) -> u64
Returns the revision of the cache entry. This revision indicates the number of times the cache entry has been updated.
pub fn index_json(&self) -> Option<&IndexJson>
pub fn index_json(&self) -> Option<&IndexJson>
Returns the cached index.json data if it was read during validation.
pub fn paths_json(&self) -> Option<&PathsJson>
pub fn paths_json(&self) -> Option<&PathsJson>
Returns the cached paths.json data if it was read during validation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheMetadata
impl RefUnwindSafe for CacheMetadata
impl Send for CacheMetadata
impl Sync for CacheMetadata
impl Unpin for CacheMetadata
impl UnwindSafe for CacheMetadata
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
Mutably borrows from an owned value. 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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.