pub struct HardForkInitiationAction(/* private fields */);Implementations§
Source§impl HardForkInitiationAction
impl HardForkInitiationAction
Sourcepub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
Sourcepub fn to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes using canonical CBOR encodings
Sourcepub fn from_cbor_bytes(
cbor_bytes: &[u8],
) -> Result<HardForkInitiationAction, JsError>
pub fn from_cbor_bytes( cbor_bytes: &[u8], ) -> Result<HardForkInitiationAction, JsError>
- Create this type from CBOR bytes
Sourcepub fn to_cbor_hex(&self) -> String
pub fn to_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
Sourcepub fn to_canonical_cbor_hex(&self) -> String
pub fn to_canonical_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
Sourcepub fn from_cbor_hex(
cbor_bytes: &str,
) -> Result<HardForkInitiationAction, JsError>
pub fn from_cbor_hex( cbor_bytes: &str, ) -> Result<HardForkInitiationAction, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
Source§impl HardForkInitiationAction
impl HardForkInitiationAction
pub fn action_id(&self) -> Option<GovActionId>
pub fn version(&self) -> ProtocolVersion
pub fn new(action_id: Option<GovActionId>, version: &ProtocolVersion) -> Self
Trait Implementations§
Source§impl AsRef<HardForkInitiationAction> for HardForkInitiationAction
impl AsRef<HardForkInitiationAction> for HardForkInitiationAction
Source§fn as_ref(&self) -> &HardForkInitiationAction
fn as_ref(&self) -> &HardForkInitiationAction
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for HardForkInitiationAction
impl Clone for HardForkInitiationAction
Source§fn clone(&self) -> HardForkInitiationAction
fn clone(&self) -> HardForkInitiationAction
Returns a duplicate 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 HardForkInitiationAction
impl Debug for HardForkInitiationAction
Source§impl From<HardForkInitiationAction> for HardForkInitiationAction
impl From<HardForkInitiationAction> for HardForkInitiationAction
Source§fn from(native: HardForkInitiationAction) -> Self
fn from(native: HardForkInitiationAction) -> Self
Converts to this type from the input type.
Source§impl From<HardForkInitiationAction> for JsValue
impl From<HardForkInitiationAction> for JsValue
Source§fn from(value: HardForkInitiationAction) -> Self
fn from(value: HardForkInitiationAction) -> Self
Converts to this type from the input type.
Source§impl Into<HardForkInitiationAction> for HardForkInitiationAction
impl Into<HardForkInitiationAction> for HardForkInitiationAction
Source§fn into(self) -> HardForkInitiationAction
fn into(self) -> HardForkInitiationAction
Converts this type into the (usually inferred) input type.
Source§impl RefFromWasmAbi for HardForkInitiationAction
impl RefFromWasmAbi for HardForkInitiationAction
Source§type Anchor = RcRef<HardForkInitiationAction>
type Anchor = RcRef<HardForkInitiationAction>
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 VectorFromWasmAbi for HardForkInitiationAction
impl VectorFromWasmAbi for HardForkInitiationAction
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[HardForkInitiationAction]>
Source§impl VectorIntoJsValue for HardForkInitiationAction
impl VectorIntoJsValue for HardForkInitiationAction
fn vector_into_jsvalue(vector: Box<[HardForkInitiationAction]>) -> JsValue
Source§impl VectorIntoWasmAbi for HardForkInitiationAction
impl VectorIntoWasmAbi for HardForkInitiationAction
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[HardForkInitiationAction]>) -> Self::Abi
Source§impl WasmDescribeVector for HardForkInitiationAction
impl WasmDescribeVector for HardForkInitiationAction
impl SupportsConstructor for HardForkInitiationAction
impl SupportsInstanceProperty for HardForkInitiationAction
impl SupportsStaticProperty for HardForkInitiationAction
Auto Trait Implementations§
impl Freeze for HardForkInitiationAction
impl RefUnwindSafe for HardForkInitiationAction
impl Send for HardForkInitiationAction
impl Sync for HardForkInitiationAction
impl Unpin for HardForkInitiationAction
impl UnwindSafe for HardForkInitiationAction
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 moreSource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§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.