pub struct Hash32(pub [u8; 32]);Tuple Fields§
§0: [u8; 32]Implementations§
Source§impl Hash32
impl Hash32
pub fn new(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn sha3_256(data: impl AsRef<[u8]>) -> Self
pub fn sha3_256_reader(reader: impl Read) -> Result<Self>
pub fn to_hex(&self) -> String
pub fn from_hex(s: &str) -> Result<Self>
pub fn as_bytes(&self) -> &[u8; 32]
Trait Implementations§
impl Copy for Hash32
Source§impl<'de> Deserialize<'de> for Hash32
impl<'de> Deserialize<'de> for Hash32
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
impl Eq for Hash32
Source§impl Ord for Hash32
impl Ord for Hash32
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Hash32
impl PartialOrd for Hash32
impl StructuralPartialEq for Hash32
Auto Trait Implementations§
impl Freeze for Hash32
impl RefUnwindSafe for Hash32
impl Send for Hash32
impl Sync for Hash32
impl Unpin for Hash32
impl UnsafeUnpin for Hash32
impl UnwindSafe for Hash32
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