Struct casper_types::DeployHash
source · pub struct DeployHash(/* private fields */);
Expand description
A newtype wrapping a [u8; DEPLOY_HASH_LENGTH]
which is the raw bytes of the
deploy hash.
Implementations§
source§impl DeployHash
impl DeployHash
sourcepub const fn new(value: [u8; 32]) -> DeployHash
pub const fn new(value: [u8; 32]) -> DeployHash
Constructs a new DeployHash
instance from the raw bytes of a deploy hash.
Trait Implementations§
source§impl Clone for DeployHash
impl Clone for DeployHash
source§fn clone(&self) -> DeployHash
fn clone(&self) -> DeployHash
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DeployHash
impl Debug for DeployHash
source§impl Default for DeployHash
impl Default for DeployHash
source§fn default() -> DeployHash
fn default() -> DeployHash
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for DeployHash
impl<'de> Deserialize<'de> for DeployHash
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl Distribution<DeployHash> for Standard
impl Distribution<DeployHash> for Standard
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> DeployHash
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> DeployHash
Generate a random value of
T
, using rng
as the source of randomness.source§impl FromBytes for DeployHash
impl FromBytes for DeployHash
source§impl Hash for DeployHash
impl Hash for DeployHash
source§impl Ord for DeployHash
impl Ord for DeployHash
source§fn cmp(&self, other: &DeployHash) -> Ordering
fn cmp(&self, other: &DeployHash) -> Ordering
1.21.0 · 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 PartialEq for DeployHash
impl PartialEq for DeployHash
source§fn eq(&self, other: &DeployHash) -> bool
fn eq(&self, other: &DeployHash) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DeployHash
impl PartialOrd for DeployHash
source§fn partial_cmp(&self, other: &DeployHash) -> Option<Ordering>
fn partial_cmp(&self, other: &DeployHash) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl Serialize for DeployHash
impl Serialize for DeployHash
source§impl ToBytes for DeployHash
impl ToBytes for DeployHash
source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Returns the length of the
Vec<u8>
which would be returned from a successful call to
to_bytes()
or into_bytes()
. The data is not actually serialized, so this call is
relatively cheap.impl Copy for DeployHash
impl Eq for DeployHash
impl StructuralEq for DeployHash
impl StructuralPartialEq for DeployHash
Auto Trait Implementations§
impl RefUnwindSafe for DeployHash
impl Send for DeployHash
impl Sync for DeployHash
impl Unpin for DeployHash
impl UnwindSafe for DeployHash
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