Struct cml_chain_wasm::crypto::VRFKeyHash
source · pub struct VRFKeyHash(/* private fields */);Implementations§
source§impl VRFKeyHash
impl VRFKeyHash
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<VRFKeyHash, JsError>
pub fn from_hex(input: &str) -> Result<VRFKeyHash, JsError>
pub fn from_raw_bytes(bytes: &[u8]) -> Result<VRFKeyHash, JsError>
Trait Implementations§
source§impl AsRef<VRFKeyHash> for VRFKeyHash
impl AsRef<VRFKeyHash> for VRFKeyHash
source§fn as_ref(&self) -> &VRFKeyHash
fn as_ref(&self) -> &VRFKeyHash
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for VRFKeyHash
impl Clone for VRFKeyHash
source§fn clone(&self) -> VRFKeyHash
fn clone(&self) -> VRFKeyHash
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 VRFKeyHash
impl Debug for VRFKeyHash
source§impl From<VRFKeyHash> for JsValue
impl From<VRFKeyHash> for JsValue
source§fn from(value: VRFKeyHash) -> JsValue
fn from(value: VRFKeyHash) -> JsValue
Converts to this type from the input type.
source§impl From<VRFKeyHash> for VRFKeyHash
impl From<VRFKeyHash> for VRFKeyHash
source§fn from(inner: VRFKeyHash) -> VRFKeyHash
fn from(inner: VRFKeyHash) -> VRFKeyHash
Converts to this type from the input type.
source§impl FromWasmAbi for VRFKeyHash
impl FromWasmAbi for VRFKeyHash
source§impl IntoWasmAbi for VRFKeyHash
impl IntoWasmAbi for VRFKeyHash
source§impl OptionFromWasmAbi for VRFKeyHash
impl OptionFromWasmAbi for VRFKeyHash
source§fn is_none(abi: &<VRFKeyHash as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<VRFKeyHash 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 VRFKeyHash
impl OptionIntoWasmAbi for VRFKeyHash
source§fn none() -> <VRFKeyHash as IntoWasmAbi>::Abi
fn none() -> <VRFKeyHash 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 VRFKeyHash
impl RefFromWasmAbi for VRFKeyHash
§type Anchor = Ref<'static, VRFKeyHash>
type Anchor = Ref<'static, VRFKeyHash>
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: <VRFKeyHash as RefFromWasmAbi>::Abi
) -> <VRFKeyHash as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <VRFKeyHash as RefFromWasmAbi>::Abi ) -> <VRFKeyHash as RefFromWasmAbi>::Anchor
source§impl RefMutFromWasmAbi for VRFKeyHash
impl RefMutFromWasmAbi for VRFKeyHash
§type Anchor = RefMut<'static, VRFKeyHash>
type Anchor = RefMut<'static, VRFKeyHash>
Same as
RefFromWasmAbi::Anchorsource§unsafe fn ref_mut_from_abi(
js: <VRFKeyHash as RefMutFromWasmAbi>::Abi
) -> <VRFKeyHash as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <VRFKeyHash as RefMutFromWasmAbi>::Abi ) -> <VRFKeyHash as RefMutFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abiAuto Trait Implementations§
impl Freeze for VRFKeyHash
impl RefUnwindSafe for VRFKeyHash
impl Send for VRFKeyHash
impl Sync for VRFKeyHash
impl Unpin for VRFKeyHash
impl UnwindSafe for VRFKeyHash
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.