Struct cml_chain_wasm::crypto::AnchorDocHash
source · pub struct AnchorDocHash(/* private fields */);Implementations§
source§impl AnchorDocHash
impl AnchorDocHash
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<AnchorDocHash, JsError>
pub fn from_hex(input: &str) -> Result<AnchorDocHash, JsError>
pub fn from_raw_bytes(bytes: &[u8]) -> Result<AnchorDocHash, JsError>
Trait Implementations§
source§impl AsRef<AnchorDocHash> for AnchorDocHash
impl AsRef<AnchorDocHash> for AnchorDocHash
source§fn as_ref(&self) -> &AnchorDocHash
fn as_ref(&self) -> &AnchorDocHash
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for AnchorDocHash
impl Clone for AnchorDocHash
source§fn clone(&self) -> AnchorDocHash
fn clone(&self) -> AnchorDocHash
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 AnchorDocHash
impl Debug for AnchorDocHash
source§impl From<AnchorDocHash> for AnchorDocHash
impl From<AnchorDocHash> for AnchorDocHash
source§fn from(inner: AnchorDocHash) -> AnchorDocHash
fn from(inner: AnchorDocHash) -> AnchorDocHash
Converts to this type from the input type.
source§impl From<AnchorDocHash> for JsValue
impl From<AnchorDocHash> for JsValue
source§fn from(value: AnchorDocHash) -> JsValue
fn from(value: AnchorDocHash) -> JsValue
Converts to this type from the input type.
source§impl FromWasmAbi for AnchorDocHash
impl FromWasmAbi for AnchorDocHash
source§impl IntoWasmAbi for AnchorDocHash
impl IntoWasmAbi for AnchorDocHash
source§impl OptionFromWasmAbi for AnchorDocHash
impl OptionFromWasmAbi for AnchorDocHash
source§fn is_none(abi: &<AnchorDocHash as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<AnchorDocHash as FromWasmAbi>::Abi) -> bool
Tests whether the argument is a “none” instance. If so it will be
deserialized as
None, and otherwise it will be passed to
FromWasmAbi.source§impl OptionIntoWasmAbi for AnchorDocHash
impl OptionIntoWasmAbi for AnchorDocHash
source§fn none() -> <AnchorDocHash as IntoWasmAbi>::Abi
fn none() -> <AnchorDocHash as IntoWasmAbi>::Abi
Returns an ABI instance indicating “none”, which JS will interpret as
the
None branch of this option. Read moresource§impl RefFromWasmAbi for AnchorDocHash
impl RefFromWasmAbi for AnchorDocHash
§type Anchor = Ref<'static, AnchorDocHash>
type Anchor = Ref<'static, AnchorDocHash>
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§unsafe fn ref_from_abi(
js: <AnchorDocHash as RefFromWasmAbi>::Abi
) -> <AnchorDocHash as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <AnchorDocHash as RefFromWasmAbi>::Abi ) -> <AnchorDocHash as RefFromWasmAbi>::Anchor
source§impl RefMutFromWasmAbi for AnchorDocHash
impl RefMutFromWasmAbi for AnchorDocHash
§type Anchor = RefMut<'static, AnchorDocHash>
type Anchor = RefMut<'static, AnchorDocHash>
Same as
RefFromWasmAbi::Anchorsource§unsafe fn ref_mut_from_abi(
js: <AnchorDocHash as RefMutFromWasmAbi>::Abi
) -> <AnchorDocHash as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <AnchorDocHash as RefMutFromWasmAbi>::Abi ) -> <AnchorDocHash as RefMutFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abiAuto Trait Implementations§
impl Freeze for AnchorDocHash
impl RefUnwindSafe for AnchorDocHash
impl Send for AnchorDocHash
impl Sync for AnchorDocHash
impl Unpin for AnchorDocHash
impl UnwindSafe for AnchorDocHash
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::Abisource§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.