pub struct CacheKey {
pub schema_version: u32,
pub platform: String,
pub ir_hash: ContentHash,
}Expand description
Cache key: (schema_version, backend_platform, ir_content_hash).
Three-part: the schema version guards against trait evolution, the platform name guards against backend-specific output, the IR hash identifies the input.
Fields§
§schema_version: u32§platform: String§ir_hash: ContentHashImplementations§
Source§impl CacheKey
impl CacheKey
Sourcepub fn for_resource<B: Backend>(backend: &B, input: &ResourceInput<'_>) -> Self
pub fn for_resource<B: Backend>(backend: &B, input: &ResourceInput<'_>) -> Self
Construct a key for the current schema and a (backend, resource).
Uses the source resource’s content_hash and the backend’s
platform() as the two variable parts.
Trait Implementations§
impl Eq for CacheKey
impl StructuralPartialEq for CacheKey
Auto Trait Implementations§
impl Freeze for CacheKey
impl RefUnwindSafe for CacheKey
impl Send for CacheKey
impl Sync for CacheKey
impl Unpin for CacheKey
impl UnsafeUnpin for CacheKey
impl UnwindSafe for CacheKey
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> 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
Compare self to
key and return true if they are equal.