Struct groestlcoin_hashes::siphash24::Hash
source · pub struct Hash(/* private fields */);
Expand description
Output of the SipHash24 hash function.
Implementations§
source§impl Hash
impl Hash
sourcepub fn forward_hex(&self) -> impl '_ + LowerHex + UpperHex
pub fn forward_hex(&self) -> impl '_ + LowerHex + UpperHex
Displays hex forwards, regardless of how this type would display it naturally.
This is mainly intended as an internal method and you shouldn’t need it unless you’re doing something special.
sourcepub fn backward_hex(&self) -> impl '_ + LowerHex + UpperHex
pub fn backward_hex(&self) -> impl '_ + LowerHex + UpperHex
Displays hex backwards, regardless of how this type would display it naturally.
This is mainly intended as an internal method and you shouldn’t need it unless you’re doing something special.
sourcepub fn from_bytes_ref(bytes: &[u8; 8]) -> &Self
pub fn from_bytes_ref(bytes: &[u8; 8]) -> &Self
Zero cost conversion between a fixed length byte array shared reference and a shared reference to this Hash type.
sourcepub fn from_bytes_mut(bytes: &mut [u8; 8]) -> &mut Self
pub fn from_bytes_mut(bytes: &mut [u8; 8]) -> &mut Self
Zero cost conversion between a fixed length byte array exclusive reference and an exclusive reference to this Hash type.
source§impl Hash
impl Hash
sourcepub fn hash_with_keys(k0: u64, k1: u64, data: &[u8]) -> Hash
pub fn hash_with_keys(k0: u64, k1: u64, data: &[u8]) -> Hash
Hashes the given data with an engine with the provided keys.
sourcepub fn hash_to_u64_with_keys(k0: u64, k1: u64, data: &[u8]) -> u64
pub fn hash_to_u64_with_keys(k0: u64, k1: u64, data: &[u8]) -> u64
Hashes the given data directly to u64 with an engine with the provided keys.
sourcepub fn from_engine_to_u64(e: HashEngine) -> u64
pub fn from_engine_to_u64(e: HashEngine) -> u64
Produces a hash as u64
from the current state of a given engine.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Hash, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Hash, D::Error>
source§impl Hash for Hash
impl Hash for Hash
§type Engine = HashEngine
type Engine = HashEngine
io::Write
trait, and to never return errors under
any conditions.source§const DISPLAY_BACKWARD: bool = false
const DISPLAY_BACKWARD: bool = false
Sha256dHash
, so here we are.source§fn from_engine(e: HashEngine) -> Hash
fn from_engine(e: HashEngine) -> Hash
source§fn from_slice(sl: &[u8]) -> Result<Hash, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<Hash, FromSliceError>
source§fn to_byte_array(self) -> Self::Bytes
fn to_byte_array(self) -> Self::Bytes
source§fn as_byte_array(&self) -> &Self::Bytes
fn as_byte_array(&self) -> &Self::Bytes
source§fn from_byte_array(bytes: Self::Bytes) -> Self
fn from_byte_array(bytes: Self::Bytes) -> Self
source§impl JsonSchema for Hash
impl JsonSchema for Hash
source§fn schema_name() -> String
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moresource§impl Ord for Hash
impl Ord for Hash
source§impl PartialEq for Hash
impl PartialEq for Hash
source§impl PartialOrd for Hash
impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl SerdeHash for Hash
impl SerdeHash for Hash
source§fn from_slice_delegated(sl: &[u8]) -> Result<Self, FromSliceError>
fn from_slice_delegated(sl: &[u8]) -> Result<Self, FromSliceError>
serde
only.source§fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error>
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error>
serde
only.source§fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
serde
only.