pub struct HasherBe<T, H: Hasher<T>>(/* private fields */);Expand description
Wrapper for types implementing Hasher<T> to change native endian writes to big endian.
This can aid in creating an endian independent hash, but be aware that types may write endian dependent data in ways that can’t be detected or fixed by this wrapper. The wrapped hasher’s algorithm must also be endian independent for this to work.
Hashers with endian independent algorithms implement the EndianIndependentAlgorithm trait.
Implementations§
Trait Implementations§
source§impl<T, H: Hasher<T>> Hasher for HasherBe<T, H>
impl<T, H: Hasher<T>> Hasher for HasherBe<T, H>
source§fn write_u128(&mut self, i: u128)
fn write_u128(&mut self, i: u128)
u128 into this hasher.source§fn write_usize(&mut self, i: usize)
fn write_usize(&mut self, i: usize)
usize into this hasher.source§fn write_i128(&mut self, i: i128)
fn write_i128(&mut self, i: i128)
i128 into this hasher.source§fn write_isize(&mut self, i: isize)
fn write_isize(&mut self, i: isize)
isize into this hasher.source§fn write_length_prefix(&mut self, len: usize)
fn write_length_prefix(&mut self, len: usize)
hasher_prefixfree_extras)source§impl<T, H: Hasher<T>> HasherWrite for HasherBe<T, H>
impl<T, H: Hasher<T>> HasherWrite for HasherBe<T, H>
source§fn write_u16(&mut self, i: u16)
fn write_u16(&mut self, i: u16)
Writes a single u16 into this
hasher in big endian byte order.
source§fn write_u32(&mut self, i: u32)
fn write_u32(&mut self, i: u32)
Writes a single u32 into this
hasher in big endian byte order.
source§fn write_u64(&mut self, i: u64)
fn write_u64(&mut self, i: u64)
Writes a single u64 into this
hasher in big endian byte order.
source§fn write_u128(&mut self, i: u128)
fn write_u128(&mut self, i: u128)
Writes a single u128 into this
hasher in big endian byte order.
source§fn write_usize(&mut self, i: usize)
fn write_usize(&mut self, i: usize)
Writes a single usize into this
hasher in big endian byte order.
source§fn write_i16(&mut self, i: i16)
fn write_i16(&mut self, i: i16)
Writes a single i16 into this
hasher in big endian byte order.
source§fn write_i32(&mut self, i: i32)
fn write_i32(&mut self, i: i32)
Writes a single i32 into this
hasher in big endian byte order.
source§fn write_i64(&mut self, i: i64)
fn write_i64(&mut self, i: i64)
Writes a single i64 into this
hasher in big endian byte order.
source§fn write_i128(&mut self, i: i128)
fn write_i128(&mut self, i: i128)
Writes a single i128 into this
hasher in big endian byte order.
source§fn write_isize(&mut self, i: isize)
fn write_isize(&mut self, i: isize)
Writes a single isize into this
hasher in big endian byte order.
source§fn write_length_prefix(&mut self, len: usize)
fn write_length_prefix(&mut self, len: usize)
Writes a length prefix into this hasher in big endian byte order.