Struct cml_crypto_wasm::GenesisHash
source · pub struct GenesisHash(/* private fields */);
Implementations§
source§impl GenesisHash
impl GenesisHash
pub fn to_raw_bytes(&self) -> Vec<u8>
pub fn to_bech32(&self, prefix: &str) -> Result<String, JsError>
pub fn to_hex(&self) -> String
pub fn from_bech32(bech32_str: &str) -> Result<GenesisHash, JsError>
pub fn from_hex(input: &str) -> Result<GenesisHash, JsError>
pub fn from_raw_bytes(bytes: &[u8]) -> Result<GenesisHash, JsError>
Trait Implementations§
source§impl AsRef<GenesisHash> for GenesisHash
impl AsRef<GenesisHash> for GenesisHash
source§fn as_ref(&self) -> &GenesisHash
fn as_ref(&self) -> &GenesisHash
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for GenesisHash
impl Clone for GenesisHash
source§fn clone(&self) -> GenesisHash
fn clone(&self) -> GenesisHash
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 GenesisHash
impl Debug for GenesisHash
source§impl From<GenesisHash> for GenesisHash
impl From<GenesisHash> for GenesisHash
source§fn from(inner: GenesisHash) -> Self
fn from(inner: GenesisHash) -> Self
Converts to this type from the input type.
source§impl From<GenesisHash> for GenesisHash
impl From<GenesisHash> for GenesisHash
source§fn from(wrapper: GenesisHash) -> GenesisHash
fn from(wrapper: GenesisHash) -> GenesisHash
Converts to this type from the input type.
source§impl From<GenesisHash> for JsValue
impl From<GenesisHash> for JsValue
source§fn from(value: GenesisHash) -> Self
fn from(value: GenesisHash) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for GenesisHash
impl FromWasmAbi for GenesisHash
source§impl IntoWasmAbi for GenesisHash
impl IntoWasmAbi for GenesisHash
source§impl OptionFromWasmAbi for GenesisHash
impl OptionFromWasmAbi for GenesisHash
source§impl OptionIntoWasmAbi for GenesisHash
impl OptionIntoWasmAbi for GenesisHash
source§impl RefFromWasmAbi for GenesisHash
impl RefFromWasmAbi for GenesisHash
§type Anchor = Ref<'static, GenesisHash>
type Anchor = Ref<'static, GenesisHash>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.source§impl RefMutFromWasmAbi for GenesisHash
impl RefMutFromWasmAbi for GenesisHash
Auto Trait Implementations§
impl RefUnwindSafe for GenesisHash
impl Send for GenesisHash
impl Sync for GenesisHash
impl Unpin for GenesisHash
impl UnwindSafe for GenesisHash
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.