Struct kvarn::prelude::utils::prelude::compact_str::core::hash::SipHasher

1.0.0 · source ·
pub struct SipHasher(_);
👎Deprecated since 1.13.0: use <code>std::collections::hash_map::DefaultHasher</code> instead
Available on non-crate feature miri-test-libstd only.
Expand description

An implementation of SipHash 2-4.

See: https://131002.net/siphash/

SipHash is a general-purpose hashing function: it runs at a good speed (competitive with Spooky and City) and permits strong keyed hashing. This lets you key your hash tables from a strong RNG, such as rand::os::OsRng.

Although the SipHash algorithm is considered to be generally strong, it is not intended for cryptographic purposes. As such, all cryptographic uses of this implementation are strongly discouraged.

Implementations§

source§

impl SipHasher

const: unstable · source

pub fn new() -> SipHasher

👎Deprecated since 1.13.0: use <code>std::collections::hash_map::DefaultHasher</code> instead

Creates a new SipHasher with the two initial keys set to 0.

const: unstable · source

pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher

👎Deprecated since 1.13.0: use <code>std::collections::hash_map::DefaultHasher</code> instead

Creates a SipHasher that is keyed off the provided keys.

Trait Implementations§

source§

impl Clone for SipHasher

source§

fn clone(&self) -> SipHasher

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SipHasher

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for SipHasher

source§

fn default() -> SipHasher

Returns the “default value” for a type. Read more
const: unstable · source§

impl Hasher for SipHasher

const: unstable · source§

fn write(&mut self, msg: &[u8])

Writes some data into this Hasher. Read more
const: unstable · source§

fn write_str(&mut self, s: &str)

🔬This is a nightly-only experimental API. (hasher_prefixfree_extras)
Writes a single str into this hasher. Read more
const: unstable · source§

fn finish(&self) -> u64

Returns the hash value for the values written so far. Read more
1.3.0 · source§

fn write_u8(&mut self, i: u8)

Writes a single u8 into this hasher.
1.3.0 · source§

fn write_u16(&mut self, i: u16)

Writes a single u16 into this hasher.
1.3.0 · source§

fn write_u32(&mut self, i: u32)

Writes a single u32 into this hasher.
1.3.0 · source§

fn write_u64(&mut self, i: u64)

Writes a single u64 into this hasher.
1.26.0 · source§

fn write_u128(&mut self, i: u128)

Writes a single u128 into this hasher.
1.3.0 · source§

fn write_usize(&mut self, i: usize)

Writes a single usize into this hasher.
1.3.0 · source§

fn write_i8(&mut self, i: i8)

Writes a single i8 into this hasher.
1.3.0 · source§

fn write_i16(&mut self, i: i16)

Writes a single i16 into this hasher.
1.3.0 · source§

fn write_i32(&mut self, i: i32)

Writes a single i32 into this hasher.
1.3.0 · source§

fn write_i64(&mut self, i: i64)

Writes a single i64 into this hasher.
1.26.0 · source§

fn write_i128(&mut self, i: i128)

Writes a single i128 into this hasher.
1.3.0 · source§

fn write_isize(&mut self, i: isize)

Writes a single isize into this hasher.
source§

fn write_length_prefix(&mut self, len: usize)

🔬This is a nightly-only experimental API. (hasher_prefixfree_extras)
Writes a length prefix into this hasher, as part of being prefix-free. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more