pub struct DefaultKeyBuilder { /* private fields */ }
Expand description

DefaultKeyBuilder is a built-in KeyBuilder for the Cache.

If the key implements TransparentKey trait, use TransparentKeyBuilder. u8, u16, u32, u64, i8, i16, i32, i64, bool implement TransparentKey by default.

See KeyBuilder if you want to write a customized KeyBuilder.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

hash_index is used to hash the key to u64

if you want a 128bit hashes, you should implement this method, or leave this method return 0 Read more

build the key to 128bit hashes.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.