Struct pwasm_std::hash::H64 [−][src]
#[repr(C)]pub struct H64(pub [u8; 8]);
Unformatted binary data of fixed length.
Methods
impl H64
[src]
impl H64
pub fn new() -> H64
[src]
pub fn new() -> H64
Create a new, zero-initialised, instance.
pub fn zero() -> H64
[src]
pub fn zero() -> H64
Synonym for new()
. Prefer to new as it's more readable.
pub fn len() -> usize
[src]
pub fn len() -> usize
Get the size of this object in bytes.
pub fn as_ptr(&self) -> *const u8
[src]
pub fn as_ptr(&self) -> *const u8
Returns a constant raw pointer to the value
pub fn as_mut_ptr(&mut self) -> *mut u8
[src]
pub fn as_mut_ptr(&mut self) -> *mut u8
Returns a mutable raw pointer to the value
pub fn clone_from_slice(&mut self, src: &[u8]) -> usize
[src]
pub fn clone_from_slice(&mut self, src: &[u8]) -> usize
Assign self to be of the same value as a slice of bytes of length len()
.
pub fn from_slice(src: &[u8]) -> H64
[src]
pub fn from_slice(src: &[u8]) -> H64
Convert a slice of bytes of length len()
to an instance of this type.
pub fn copy_to(&self, dest: &mut [u8])
[src]
pub fn copy_to(&self, dest: &mut [u8])
Copy the data of this object into some mutable slice of length len()
.
pub fn contains(&'a self, b: &'a H64) -> bool
[src]
pub fn contains(&'a self, b: &'a H64) -> bool
Returns true
if all bits set in b
are also set in self
.
pub fn is_zero(&self) -> bool
[src]
pub fn is_zero(&self) -> bool
Returns true
if no bits are set.
pub fn low_u64(&self) -> u64
[src]
pub fn low_u64(&self) -> u64
Returns the lowest 8 bytes interpreted as a BigEndian integer.
Trait Implementations
impl Copy for H64
[src]
impl Copy for H64
impl Ord for H64
[src]
impl Ord for H64
fn cmp(&self, other: &H64) -> Ordering
[src]
fn cmp(&self, other: &H64) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl AsMut<[u8]> for H64
[src]
impl AsMut<[u8]> for H64
impl BitXor<H64> for H64
[src]
impl BitXor<H64> for H64
Moving BitXor
type Output = H64
The resulting type after applying the ^
operator.
fn bitxor(self, rhs: H64) -> <H64 as BitXor<H64>>::Output
[src]
fn bitxor(self, rhs: H64) -> <H64 as BitXor<H64>>::Output
Performs the ^
operation.
impl<'a> BitXor<&'a H64> for &'a H64
[src]
impl<'a> BitXor<&'a H64> for &'a H64
BitXor
on references
type Output = H64
The resulting type after applying the ^
operator.
fn bitxor(self, rhs: &'a H64) -> <&'a H64 as BitXor<&'a H64>>::Output
[src]
fn bitxor(self, rhs: &'a H64) -> <&'a H64 as BitXor<&'a H64>>::Output
Performs the ^
operation.
impl Deref for H64
[src]
impl Deref for H64
type Target = [u8]
The resulting type after dereferencing.
fn deref(&self) -> &[u8]
[src]
fn deref(&self) -> &[u8]
Dereferences the value.
impl Default for H64
[src]
impl Default for H64
impl DerefMut for H64
[src]
impl DerefMut for H64
impl Clone for H64
[src]
impl Clone for H64
fn clone(&self) -> H64
[src]
fn clone(&self) -> H64
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a> BitOr<&'a H64> for &'a H64
[src]
impl<'a> BitOr<&'a H64> for &'a H64
BitOr
on references
type Output = H64
The resulting type after applying the |
operator.
fn bitor(self, rhs: &'a H64) -> <&'a H64 as BitOr<&'a H64>>::Output
[src]
fn bitor(self, rhs: &'a H64) -> <&'a H64 as BitOr<&'a H64>>::Output
Performs the |
operation.
impl BitOr<H64> for H64
[src]
impl BitOr<H64> for H64
Moving BitOr
type Output = H64
The resulting type after applying the |
operator.
fn bitor(self, rhs: H64) -> <H64 as BitOr<H64>>::Output
[src]
fn bitor(self, rhs: H64) -> <H64 as BitOr<H64>>::Output
Performs the |
operation.
impl Hash for H64
[src]
impl Hash for H64
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialOrd<H64> for H64
[src]
impl PartialOrd<H64> for H64
fn partial_cmp(&self, other: &H64) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &H64) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
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
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'a> BitAnd<&'a H64> for &'a H64
[src]
impl<'a> BitAnd<&'a H64> for &'a H64
BitAnd
on references
type Output = H64
The resulting type after applying the &
operator.
fn bitand(self, rhs: &'a H64) -> <&'a H64 as BitAnd<&'a H64>>::Output
[src]
fn bitand(self, rhs: &'a H64) -> <&'a H64 as BitAnd<&'a H64>>::Output
Performs the &
operation.
impl BitAnd<H64> for H64
[src]
impl BitAnd<H64> for H64
Moving BitAnd
type Output = H64
The resulting type after applying the &
operator.
fn bitand(self, rhs: H64) -> <H64 as BitAnd<H64>>::Output
[src]
fn bitand(self, rhs: H64) -> <H64 as BitAnd<H64>>::Output
Performs the &
operation.
impl Index<usize> for H64
[src]
impl Index<usize> for H64
type Output = u8
The returned type after indexing.
fn index(&self, index: usize) -> &u8
[src]
fn index(&self, index: usize) -> &u8
Performs the indexing (container[index]
) operation.
impl Index<Range<usize>> for H64
[src]
impl Index<Range<usize>> for H64
type Output = [u8]
The returned type after indexing.
fn index(&self, index: Range<usize>) -> &[u8]
[src]
fn index(&self, index: Range<usize>) -> &[u8]
Performs the indexing (container[index]
) operation.
impl Index<RangeFull> for H64
[src]
impl Index<RangeFull> for H64
type Output = [u8]
The returned type after indexing.
fn index(&self, _index: RangeFull) -> &[u8]
[src]
fn index(&self, _index: RangeFull) -> &[u8]
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for H64
[src]
impl IndexMut<usize> for H64
fn index_mut(&mut self, index: usize) -> &mut u8
[src]
fn index_mut(&mut self, index: usize) -> &mut u8
Performs the mutable indexing (container[index]
) operation.
impl IndexMut<RangeFull> for H64
[src]
impl IndexMut<RangeFull> for H64
fn index_mut(&mut self, _index: RangeFull) -> &mut [u8]
[src]
fn index_mut(&mut self, _index: RangeFull) -> &mut [u8]
Performs the mutable indexing (container[index]
) operation.
impl IndexMut<Range<usize>> for H64
[src]
impl IndexMut<Range<usize>> for H64
fn index_mut(&mut self, index: Range<usize>) -> &mut [u8]
[src]
fn index_mut(&mut self, index: Range<usize>) -> &mut [u8]
Performs the mutable indexing (container[index]
) operation.
impl<'a> From<&'a [u8]> for H64
[src]
impl<'a> From<&'a [u8]> for H64
impl From<u64> for H64
[src]
impl From<u64> for H64
impl From<H64> for [u8; 8]
[src]
impl From<H64> for [u8; 8]
impl From<H256> for H64
[src]
impl From<H256> for H64
impl From<[u8; 8]> for H64
[src]
impl From<[u8; 8]> for H64
impl PartialEq<H64> for H64
[src]
impl PartialEq<H64> for H64
fn eq(&self, other: &H64) -> bool
[src]
fn eq(&self, other: &H64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for H64
[src]
impl Eq for H64
impl AsRef<[u8]> for H64
[src]
impl AsRef<[u8]> for H64