pub struct Key<'a> {
pub name: &'a str,
pub hash: u64,
pub secondary_hash: u64,
}Expand description
Cache keys consist of a filename and two hash values. The two
hashes should ideally be computed by distinct functions of the
key’s name, but Kismet will function correctly if the hash and
secondary_hash are the same. Each hash function must be
identical for all processes that access the same sharded cache
directory.
The name should not be empty nor start with a dot, forward
slash, a backslash: caches will reject any operation on such names
with an ErrorKind::InvalidInput error.
Fields§
§name: &'a str§hash: u64§secondary_hash: u64Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Key<'a>
impl<'a> RefUnwindSafe for Key<'a>
impl<'a> Send for Key<'a>
impl<'a> Sync for Key<'a>
impl<'a> Unpin for Key<'a>
impl<'a> UnwindSafe for Key<'a>
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