Struct cml_chain_wasm::PoolVotingThresholds
source · pub struct PoolVotingThresholds(/* private fields */);
Implementations§
source§impl PoolVotingThresholds
impl PoolVotingThresholds
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 from_cbor_bytes(
cbor_bytes: &[u8]
) -> Result<PoolVotingThresholds, JsError>
pub fn from_cbor_bytes( cbor_bytes: &[u8] ) -> Result<PoolVotingThresholds, 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 from_cbor_hex(cbor_bytes: &str) -> Result<PoolVotingThresholds, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<PoolVotingThresholds, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
source§impl PoolVotingThresholds
impl PoolVotingThresholds
pub fn motion_no_confidence(&self) -> UnitInterval
pub fn committee_normal(&self) -> UnitInterval
pub fn committee_no_confidence(&self) -> UnitInterval
pub fn hard_fork_initiation(&self) -> UnitInterval
pub fn new( motion_no_confidence: &UnitInterval, committee_normal: &UnitInterval, committee_no_confidence: &UnitInterval, hard_fork_initiation: &UnitInterval ) -> Self
Trait Implementations§
source§impl AsRef<PoolVotingThresholds> for PoolVotingThresholds
impl AsRef<PoolVotingThresholds> for PoolVotingThresholds
source§fn as_ref(&self) -> &PoolVotingThresholds
fn as_ref(&self) -> &PoolVotingThresholds
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for PoolVotingThresholds
impl Clone for PoolVotingThresholds
source§fn clone(&self) -> PoolVotingThresholds
fn clone(&self) -> PoolVotingThresholds
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 PoolVotingThresholds
impl Debug for PoolVotingThresholds
source§impl From<PoolVotingThresholds> for JsValue
impl From<PoolVotingThresholds> for JsValue
source§fn from(value: PoolVotingThresholds) -> Self
fn from(value: PoolVotingThresholds) -> Self
Converts to this type from the input type.
source§impl From<PoolVotingThresholds> for PoolVotingThresholds
impl From<PoolVotingThresholds> for PoolVotingThresholds
source§fn from(native: PoolVotingThresholds) -> Self
fn from(native: PoolVotingThresholds) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for PoolVotingThresholds
impl FromWasmAbi for PoolVotingThresholds
source§impl Into<PoolVotingThresholds> for PoolVotingThresholds
impl Into<PoolVotingThresholds> for PoolVotingThresholds
source§fn into(self) -> PoolVotingThresholds
fn into(self) -> PoolVotingThresholds
Converts this type into the (usually inferred) input type.
source§impl IntoWasmAbi for PoolVotingThresholds
impl IntoWasmAbi for PoolVotingThresholds
source§impl RefFromWasmAbi for PoolVotingThresholds
impl RefFromWasmAbi for PoolVotingThresholds
§type Anchor = Ref<'static, PoolVotingThresholds>
type Anchor = Ref<'static, PoolVotingThresholds>
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.Auto Trait Implementations§
impl RefUnwindSafe for PoolVotingThresholds
impl Send for PoolVotingThresholds
impl Sync for PoolVotingThresholds
impl Unpin for PoolVotingThresholds
impl UnwindSafe for PoolVotingThresholds
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
.