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