Struct kismet_cache::Key[][src]

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 strhash: u64secondary_hash: u64

Implementations

Returns a new Key for this name, hash, and secondary_hash.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.