Struct cml_chain_wasm::certs::PoolParams
source · pub struct PoolParams(/* private fields */);Implementations§
source§impl PoolParams
impl PoolParams
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<PoolParams, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<PoolParams, 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<PoolParams, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<PoolParams, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
source§impl PoolParams
impl PoolParams
source§impl PoolParams
impl PoolParams
pub fn operator(&self) -> Ed25519KeyHash
pub fn vrf_keyhash(&self) -> VRFKeyHash
pub fn pledge(&self) -> Coin
pub fn cost(&self) -> Coin
pub fn margin(&self) -> UnitInterval
pub fn reward_account(&self) -> RewardAccount
pub fn pool_owners(&self) -> SetEd25519KeyHash
pub fn relays(&self) -> RelayList
pub fn pool_metadata(&self) -> Option<PoolMetadata>
pub fn new( operator: &Ed25519KeyHash, vrf_keyhash: &VRFKeyHash, pledge: Coin, cost: Coin, margin: &UnitInterval, reward_account: &RewardAccount, pool_owners: &SetEd25519KeyHash, relays: &RelayList, pool_metadata: Option<PoolMetadata> ) -> Self
Trait Implementations§
source§impl AsRef<PoolParams> for PoolParams
impl AsRef<PoolParams> for PoolParams
source§fn as_ref(&self) -> &PoolParams
fn as_ref(&self) -> &PoolParams
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for PoolParams
impl Clone for PoolParams
source§fn clone(&self) -> PoolParams
fn clone(&self) -> PoolParams
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 PoolParams
impl Debug for PoolParams
source§impl From<PoolParams> for JsValue
impl From<PoolParams> for JsValue
source§fn from(value: PoolParams) -> Self
fn from(value: PoolParams) -> Self
Converts to this type from the input type.
source§impl From<PoolParams> for PoolParams
impl From<PoolParams> for PoolParams
source§fn from(native: PoolParams) -> Self
fn from(native: PoolParams) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for PoolParams
impl FromWasmAbi for PoolParams
source§impl Into<PoolParams> for PoolParams
impl Into<PoolParams> for PoolParams
source§fn into(self) -> PoolParams
fn into(self) -> PoolParams
Converts this type into the (usually inferred) input type.
source§impl IntoWasmAbi for PoolParams
impl IntoWasmAbi for PoolParams
source§impl OptionFromWasmAbi for PoolParams
impl OptionFromWasmAbi for PoolParams
source§impl OptionIntoWasmAbi for PoolParams
impl OptionIntoWasmAbi for PoolParams
source§impl RefFromWasmAbi for PoolParams
impl RefFromWasmAbi for PoolParams
§type Anchor = Ref<'static, PoolParams>
type Anchor = Ref<'static, PoolParams>
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 RefMutFromWasmAbi for PoolParams
impl RefMutFromWasmAbi for PoolParams
Auto Trait Implementations§
impl Freeze for PoolParams
impl RefUnwindSafe for PoolParams
impl Send for PoolParams
impl Sync for PoolParams
impl Unpin for PoolParams
impl UnwindSafe for PoolParams
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> 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,
§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.