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§
Source§impl CacheMetadata
impl CacheMetadata
Sourcepub 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.
Sourcepub 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.
Sourcepub 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 UnsafeUnpin 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
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>
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 more