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

A hasher designed to eke a little more speed out, given TypeId’s known characteristics.

Specifically, this is a no-op hasher that expects to be fed a u64’s worth of randomly-distributed bits. It works well for TypeId (eliminating start-up time, so that my get_missing benchmark is ~30ns rather than ~900ns, and being a good deal faster after that, so that my insert_and_get_on_260_types benchmark is ~12μs instead of ~21.5μs), but will panic in debug mode and always emit zeros in release mode for any other sorts of inputs, so yeah, don’t use it! 😀

Trait Implementations

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

Writes some data into this Hasher. Read more

Returns the hash value for the values written so far. Read more

Writes a single u8 into this hasher.

Writes a single u16 into this hasher.

Writes a single u32 into this hasher.

Writes a single u64 into this hasher.

Writes a single u128 into this hasher.

Writes a single usize into this hasher.

Writes a single i8 into this hasher.

Writes a single i16 into this hasher.

Writes a single i32 into this hasher.

Writes a single i64 into this hasher.

Writes a single i128 into this hasher.

Writes a single isize into this hasher.

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 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.