Struct cml_crypto::BlockBodyHash
source · pub struct BlockBodyHash(/* private fields */);Implementations§
source§impl BlockBodyHash
impl BlockBodyHash
pub const BYTE_COUNT: usize = 32usize
pub fn to_bech32(&self, prefix: &str) -> Result<String, CryptoError>
pub fn from_bech32(bech_str: &str) -> Result<BlockBodyHash, CryptoError>
pub fn to_hex(&self) -> String
pub fn from_hex(input: &str) -> Result<Self, CryptoError>
Trait Implementations§
source§impl Clone for BlockBodyHash
impl Clone for BlockBodyHash
source§fn clone(&self) -> BlockBodyHash
fn clone(&self) -> BlockBodyHash
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 BlockBodyHash
impl Debug for BlockBodyHash
source§impl<'de> Deserialize<'de> for BlockBodyHash
impl<'de> Deserialize<'de> for BlockBodyHash
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for BlockBodyHash
impl Display for BlockBodyHash
source§impl Hash for BlockBodyHash
impl Hash for BlockBodyHash
source§impl JsonSchema for BlockBodyHash
impl JsonSchema for BlockBodyHash
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moresource§impl Ord for BlockBodyHash
impl Ord for BlockBodyHash
source§fn cmp(&self, other: &BlockBodyHash) -> Ordering
fn cmp(&self, other: &BlockBodyHash) -> 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 BlockBodyHash
impl PartialEq for BlockBodyHash
source§fn eq(&self, other: &BlockBodyHash) -> bool
fn eq(&self, other: &BlockBodyHash) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for BlockBodyHash
impl PartialOrd for BlockBodyHash
source§fn partial_cmp(&self, other: &BlockBodyHash) -> Option<Ordering>
fn partial_cmp(&self, other: &BlockBodyHash) -> 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 RawBytesEncoding for BlockBodyHash
impl RawBytesEncoding for BlockBodyHash
fn to_raw_bytes(&self) -> &[u8] ⓘ
fn from_raw_bytes(bytes: &[u8]) -> Result<Self, CryptoError>
fn to_raw_hex(&self) -> String
fn from_raw_hex(hex_str: &str) -> Result<Self, CryptoError>where
Self: Sized,
source§impl Serialize for BlockBodyHash
impl Serialize for BlockBodyHash
impl Copy for BlockBodyHash
impl Eq for BlockBodyHash
impl StructuralEq for BlockBodyHash
impl StructuralPartialEq for BlockBodyHash
Auto Trait Implementations§
impl RefUnwindSafe for BlockBodyHash
impl Send for BlockBodyHash
impl Sync for BlockBodyHash
impl Unpin for BlockBodyHash
impl UnwindSafe for BlockBodyHash
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