Expand description
Fixed-size uninterpreted hash type with 32 bytes (256 bits) size.
Tuple Fields
0: [u8; 32]
Implementations
Returns a new fixed hash where all bits are set to the given byte.
Extracts a byte slice containing the entire fixed hash.
Extracts a mutable byte slice containing the entire fixed hash.
Extracts a reference to the byte array containing the entire fixed hash.
Extracts a reference to the byte array containing the entire fixed hash.
Returns the inner bytes array.
Returns a mutable raw pointer to the value.
Utilities using the byteorder
crate.
Returns the lowest 8 bytes interpreted as big-endian.
Note
For hash type with less than 8 bytes the missing bytes are interpreted as being zero.
Returns the lowest 8 bytes interpreted as little-endian.
Note
For hash type with less than 8 bytes the missing bytes are interpreted as being zero.
Returns the lowest 8 bytes interpreted as native-endian.
Note
For hash type with less than 8 bytes the missing bytes are interpreted as being zero.
Creates a new hash type from the given u64
value.
Note
- The given
u64
value is interpreted as big endian. - Ignores the most significant bits of the given value if the hash type has less than 8 bytes.
Creates a new hash type from the given u64
value.
Note
- The given
u64
value is interpreted as little endian. - Ignores the most significant bits of the given value if the hash type has less than 8 bytes.
Creates a new hash type from the given u64
value.
Note
- The given
u64
value is interpreted as native endian. - Ignores the most significant bits of the given value if the hash type has less than 8 bytes.
Utilities using the rand
crate.
Assign self
to a cryptographically random value using the
given random number generator.
Create a new hash with cryptographically random content using the given random number generator.
Trait Implementations
Performs the &=
operation. Read more
Performs the &=
operation. Read more
Performs the |=
operation. Read more
Performs the |=
operation. Read more
Performs the ^=
operation. Read more
Performs the ^=
operation. Read more
pub fn deserialize<D>(
deserializer: D
) -> Result<H256, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(
deserializer: D
) -> Result<H256, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
type Err = FromHexError
type Err = FromHexError
The associated error which can be returned from parsing.
Upper bound, in bytes, of the maximum encoded size of this item.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the reference to the inner type.
Consumes self
and returns the inner type.
Construct Self
from the given inner
.
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Convert from an instance of T
to Self. This is not guaranteed to be
whatever counts as a valid instance of T
and it’s up to the caller to
ensure that it makes sense. Read more
Convert from an instance of T
to Self. This is not guaranteed to be
whatever counts as a valid instance of T
and it’s up to the caller to
ensure that it makes sense. Read more
Convert from an instance of T
to Self. This is not guaranteed to be
whatever counts as a valid instance of T
and it’s up to the caller to
ensure that it makes sense. Read more
Auto Trait Implementations
impl RefUnwindSafe for H256
impl UnwindSafe for H256
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
type SelfInstance = T
type SelfInstance = T
As Self
can be an unsized type, it needs to be represented by a sized type at the host.
This SelfInstance
is the sized type. Read more
pub fn from_ffi_value(
context: &mut dyn FunctionContext,
arg: <<T as PassBy>::PassBy as RIType>::FFIType
) -> Result<T, String>
pub fn from_ffi_value(
context: &mut dyn FunctionContext,
arg: <<T as PassBy>::PassBy as RIType>::FFIType
) -> Result<T, String>
Create SelfInstance
from the given
pub fn into_ffi_value(
self,
context: &mut dyn FunctionContext
) -> Result<<<T as PassBy>::PassBy as RIType>::FFIType, String>
pub fn into_ffi_value(
self,
context: &mut dyn FunctionContext
) -> Result<<<T as PassBy>::PassBy as RIType>::FFIType, String>
Convert self
into a ffi value.
The counterpart to unchecked_from
.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more