pub struct KeyFingerprint(pub String);Expand description
16-hex-char fingerprint of an HMAC key, as it appears in on-disk filenames.
The disk layout partitions every file by the first 8 bytes of
blake3::hash(hmac_key) rendered as 16 lowercase hex chars — the
sidecar prefix in {fp}-{cache_key}.ptxbin and the middle segment in
the artifact store’s {content_hash}.{fp}.bin blobs both use the same
fingerprint. Rotating the HMAC key changes the fingerprint, so a
rotation leaves the previous generation’s files behind under their old
fingerprint, trivially sweepable by KernelCache::gc_disk.
This is not secret: it is blake3(key) truncated, already publicly
observable to anyone with directory-list access (it is in the
filename). It is a partitioning tag, not a confidentiality boundary —
the HMAC trailer on each blob is what actually gates load.
Obtain the fingerprint of the currently-active key via
KernelCache::active_disk_key_fingerprint, and the set present on
disk via KernelCache::disk_key_fingerprints.
Tuple Fields§
§0: StringImplementations§
Source§impl KeyFingerprint
impl KeyFingerprint
Sourcepub fn of_key(key: &[u8; 32]) -> Self
pub fn of_key(key: &[u8; 32]) -> Self
The 16-hex-char fingerprint of key — the same value the disk
layout stamps into filenames. Equivalent to the artifact store’s
own key_fingerprint_hex; kept in lock-step so a KernelCache and
its underlying DiskArtifactStore always agree on the partition.
Trait Implementations§
Source§impl Clone for KeyFingerprint
impl Clone for KeyFingerprint
Source§fn clone(&self) -> KeyFingerprint
fn clone(&self) -> KeyFingerprint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KeyFingerprint
impl Debug for KeyFingerprint
Source§impl Display for KeyFingerprint
impl Display for KeyFingerprint
impl Eq for KeyFingerprint
Source§impl Hash for KeyFingerprint
impl Hash for KeyFingerprint
Source§impl Ord for KeyFingerprint
impl Ord for KeyFingerprint
Source§fn cmp(&self, other: &KeyFingerprint) -> Ordering
fn cmp(&self, other: &KeyFingerprint) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for KeyFingerprint
impl PartialEq for KeyFingerprint
Source§fn eq(&self, other: &KeyFingerprint) -> bool
fn eq(&self, other: &KeyFingerprint) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for KeyFingerprint
impl PartialOrd for KeyFingerprint
impl StructuralPartialEq for KeyFingerprint
Auto Trait Implementations§
impl Freeze for KeyFingerprint
impl RefUnwindSafe for KeyFingerprint
impl Send for KeyFingerprint
impl Sync for KeyFingerprint
impl Unpin for KeyFingerprint
impl UnsafeUnpin for KeyFingerprint
impl UnwindSafe for KeyFingerprint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.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§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