Struct risc0_zkp_core::sha::Digest
source · [−]#[repr(transparent)]pub struct Digest(_);Expand description
The result of a SHA-256 hashing function.
Implementations
sourceimpl Digest
impl Digest
sourcepub fn try_from_slice(words: &[u32]) -> Result<Self>
pub fn try_from_slice(words: &[u32]) -> Result<Self>
Try to create a Digest from a slice of words.
sourcepub fn from_slice(words: &[u32]) -> Self
pub fn from_slice(words: &[u32]) -> Self
Create a Digest from a slice of words.
Panics
Panics if the number of words is not exactly DIGEST_WORDS.
sourcepub fn as_mut_slice(&mut self) -> &mut [u32]
pub fn as_mut_slice(&mut self) -> &mut [u32]
Returns a mutable slice of words.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Digest
impl<'de> Deserialize<'de> for Digest
sourcefn 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
impl Copy for Digest
impl Eq for Digest
impl Pod for Digest
impl StructuralEq for Digest
impl StructuralPartialEq for Digest
Auto Trait Implementations
impl RefUnwindSafe for Digest
impl Send for Digest
impl Sync for Digest
impl Unpin for Digest
impl UnwindSafe for Digest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedBitPattern for T where
T: AnyBitPattern,
impl<T> CheckedBitPattern for T where
T: AnyBitPattern,
type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during is_valid_bit_pattern. Read more
sourcefn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret bits as &Self.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more