pub struct DatumHash(/* private fields */);
Implementations§
Source§impl DatumHash
impl DatumHash
pub const BYTE_COUNT: usize = 32usize
pub fn to_bech32(&self, prefix: &str) -> Result<String, CryptoError>
pub fn from_bech32(bech_str: &str) -> Result<DatumHash, CryptoError>
pub fn to_hex(&self) -> String
pub fn from_hex(input: &str) -> Result<DatumHash, DeserializeError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DatumHash
impl<'de> Deserialize<'de> for DatumHash
Source§fn deserialize<D>(
deserializer: D,
) -> Result<DatumHash, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<DatumHash, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for DatumHash
impl JsonSchema for DatumHash
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 DatumHash
impl Ord for DatumHash
Source§impl PartialOrd for DatumHash
impl PartialOrd for DatumHash
Source§impl RawBytesEncoding for DatumHash
impl RawBytesEncoding for DatumHash
fn to_raw_bytes(&self) -> &[u8] ⓘ
fn from_raw_bytes(bytes: &[u8]) -> Result<DatumHash, DeserializeError>
fn to_raw_hex(&self) -> String
fn from_raw_hex(hex_str: &str) -> Result<Self, DeserializeError>where
Self: Sized,
Source§impl Serialize for DatumHash
impl Serialize for DatumHash
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
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
impl Copy for DatumHash
impl Eq for DatumHash
impl StructuralPartialEq for DatumHash
Auto Trait Implementations§
impl Freeze for DatumHash
impl RefUnwindSafe for DatumHash
impl Send for DatumHash
impl Sync for DatumHash
impl Unpin for DatumHash
impl UnwindSafe for DatumHash
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more