Struct primitive_types::H512
source · [−]Expand description
Fixed-size uninterpreted hash type with 64 bytes (512 bits) size.
Tuple Fields
0: [u8; 64]
Implementations
sourceimpl H512
impl H512
sourcepub const fn repeat_byte(byte: u8) -> H512
pub const fn repeat_byte(byte: u8) -> H512
Returns a new fixed hash where all bits are set to the given byte.
sourcepub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Extracts a byte slice containing the entire fixed hash.
sourcepub fn as_bytes_mut(&mut self) -> &mut [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn as_bytes_mut(&mut self) -> &mut [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Extracts a mutable byte slice containing the entire fixed hash.
sourcepub const fn as_fixed_bytes(&self) -> &[u8; 64]
pub const fn as_fixed_bytes(&self) -> &[u8; 64]
Extracts a reference to the byte array containing the entire fixed hash.
sourcepub fn as_fixed_bytes_mut(&mut self) -> &mut [u8; 64]
pub fn as_fixed_bytes_mut(&mut self) -> &mut [u8; 64]
Extracts a reference to the byte array containing the entire fixed hash.
sourcepub const fn to_fixed_bytes(self) -> [u8; 64]
pub const fn to_fixed_bytes(self) -> [u8; 64]
Returns the inner bytes array.
sourcepub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Returns a mutable raw pointer to the value.
sourcepub fn assign_from_slice(&mut self, src: &[u8])
pub fn assign_from_slice(&mut self, src: &[u8])
sourcepub fn from_slice(src: &[u8]) -> Self
pub fn from_slice(src: &[u8]) -> Self
Trait Implementations
sourceimpl<'r> BitAndAssign<&'r H512> for H512
impl<'r> BitAndAssign<&'r H512> for H512
sourcefn bitand_assign(&mut self, rhs: &'r H512)
fn bitand_assign(&mut self, rhs: &'r H512)
Performs the &=
operation. Read more
sourceimpl BitAndAssign<H512> for H512
impl BitAndAssign<H512> for H512
sourcefn bitand_assign(&mut self, rhs: H512)
fn bitand_assign(&mut self, rhs: H512)
Performs the &=
operation. Read more
sourceimpl<'r> BitOrAssign<&'r H512> for H512
impl<'r> BitOrAssign<&'r H512> for H512
sourcefn bitor_assign(&mut self, rhs: &'r H512)
fn bitor_assign(&mut self, rhs: &'r H512)
Performs the |=
operation. Read more
sourceimpl BitOrAssign<H512> for H512
impl BitOrAssign<H512> for H512
sourcefn bitor_assign(&mut self, rhs: H512)
fn bitor_assign(&mut self, rhs: H512)
Performs the |=
operation. Read more
sourceimpl<'r> BitXorAssign<&'r H512> for H512
impl<'r> BitXorAssign<&'r H512> for H512
sourcefn bitxor_assign(&mut self, rhs: &'r H512)
fn bitxor_assign(&mut self, rhs: &'r H512)
Performs the ^=
operation. Read more
sourceimpl BitXorAssign<H512> for H512
impl BitXorAssign<H512> for H512
sourcefn bitxor_assign(&mut self, rhs: H512)
fn bitxor_assign(&mut self, rhs: H512)
Performs the ^=
operation. Read more
sourceimpl Ord for H512
impl Ord for H512
sourceimpl PartialOrd<H512> for H512
impl PartialOrd<H512> for H512
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for H512
impl Eq for H512
Auto Trait Implementations
impl RefUnwindSafe for H512
impl Send for H512
impl Sync for H512
impl Unpin for H512
impl UnwindSafe for H512
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> ToHex for T where
T: AsRef<[u8]>,
impl<T> ToHex for T where
T: AsRef<[u8]>,
sourcefn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Lower case
letters are used (e.g. f9b4ca
) Read more
sourcefn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Upper case
letters are used (e.g. F9B4CA
) Read more
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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more