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