pub struct Hash<F, W, const DIGEST_ELEMS: usize> { /* private fields */ }
Expand description
A wrapper around an array digest, with a phantom type parameter to ensure that the digest is associated with a particular field.
Trait Implementations§
Source§impl<F, W, const DIGEST_ELEMS: usize> AsRef<[W; DIGEST_ELEMS]> for Hash<F, W, DIGEST_ELEMS>
impl<F, W, const DIGEST_ELEMS: usize> AsRef<[W; DIGEST_ELEMS]> for Hash<F, W, DIGEST_ELEMS>
Source§fn as_ref(&self) -> &[W; DIGEST_ELEMS]
fn as_ref(&self) -> &[W; DIGEST_ELEMS]
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<F, W, const DIGEST_ELEMS: usize> Borrow<[W; DIGEST_ELEMS]> for Hash<F, W, DIGEST_ELEMS>
impl<F, W, const DIGEST_ELEMS: usize> Borrow<[W; DIGEST_ELEMS]> for Hash<F, W, DIGEST_ELEMS>
Source§fn borrow(&self) -> &[W; DIGEST_ELEMS]
fn borrow(&self) -> &[W; DIGEST_ELEMS]
Immutably borrows from an owned value. Read more
Source§impl<'de, F, W, const DIGEST_ELEMS: usize> Deserialize<'de> for Hash<F, W, DIGEST_ELEMS>where
[W; DIGEST_ELEMS]: Deserialize<'de>,
impl<'de, F, W, const DIGEST_ELEMS: usize> Deserialize<'de> for Hash<F, W, DIGEST_ELEMS>where
[W; DIGEST_ELEMS]: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<F, W, const DIGEST_ELEMS: usize> From<[W; DIGEST_ELEMS]> for Hash<F, W, DIGEST_ELEMS>
impl<F, W, const DIGEST_ELEMS: usize> From<[W; DIGEST_ELEMS]> for Hash<F, W, DIGEST_ELEMS>
Source§fn from(value: [W; DIGEST_ELEMS]) -> Self
fn from(value: [W; DIGEST_ELEMS]) -> Self
Converts to this type from the input type.
Source§impl<F, W, const DIGEST_ELEMS: usize> From<Hash<F, W, DIGEST_ELEMS>> for [W; DIGEST_ELEMS]
impl<F, W, const DIGEST_ELEMS: usize> From<Hash<F, W, DIGEST_ELEMS>> for [W; DIGEST_ELEMS]
Source§fn from(value: Hash<F, W, DIGEST_ELEMS>) -> [W; DIGEST_ELEMS]
fn from(value: Hash<F, W, DIGEST_ELEMS>) -> [W; DIGEST_ELEMS]
Converts to this type from the input type.
Source§impl<F, W, const DIGEST_ELEMS: usize> IntoIterator for Hash<F, W, DIGEST_ELEMS>
impl<F, W, const DIGEST_ELEMS: usize> IntoIterator for Hash<F, W, DIGEST_ELEMS>
Source§impl<F, W: PartialEq, const DIGEST_ELEMS: usize> PartialEq<[W; DIGEST_ELEMS]> for Hash<F, W, DIGEST_ELEMS>
impl<F, W: PartialEq, const DIGEST_ELEMS: usize> PartialEq<[W; DIGEST_ELEMS]> for Hash<F, W, DIGEST_ELEMS>
Source§impl<F: PartialEq, W: PartialEq, const DIGEST_ELEMS: usize> PartialEq for Hash<F, W, DIGEST_ELEMS>
impl<F: PartialEq, W: PartialEq, const DIGEST_ELEMS: usize> PartialEq for Hash<F, W, DIGEST_ELEMS>
Source§impl<F, W, const DIGEST_ELEMS: usize> Serialize for Hash<F, W, DIGEST_ELEMS>where
[W; DIGEST_ELEMS]: Serialize,
impl<F, W, const DIGEST_ELEMS: usize> Serialize for Hash<F, W, DIGEST_ELEMS>where
[W; DIGEST_ELEMS]: Serialize,
impl<F: Copy, W: Copy, const DIGEST_ELEMS: usize> Copy for Hash<F, W, DIGEST_ELEMS>
impl<F: Eq, W: Eq, const DIGEST_ELEMS: usize> Eq for Hash<F, W, DIGEST_ELEMS>
impl<F, W, const DIGEST_ELEMS: usize> StructuralPartialEq for Hash<F, W, DIGEST_ELEMS>
Auto Trait Implementations§
impl<F, W, const DIGEST_ELEMS: usize> Freeze for Hash<F, W, DIGEST_ELEMS>where
W: Freeze,
impl<F, W, const DIGEST_ELEMS: usize> RefUnwindSafe for Hash<F, W, DIGEST_ELEMS>where
W: RefUnwindSafe,
F: RefUnwindSafe,
impl<F, W, const DIGEST_ELEMS: usize> Send for Hash<F, W, DIGEST_ELEMS>
impl<F, W, const DIGEST_ELEMS: usize> Sync for Hash<F, W, DIGEST_ELEMS>
impl<F, W, const DIGEST_ELEMS: usize> Unpin for Hash<F, W, DIGEST_ELEMS>
impl<F, W, const DIGEST_ELEMS: usize> UnwindSafe for Hash<F, W, DIGEST_ELEMS>where
W: UnwindSafe,
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more