pub struct StakeDelegation(/* private fields */);Implementations§
Source§impl StakeDelegation
impl StakeDelegation
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<StakeDelegation, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<StakeDelegation, 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<StakeDelegation, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<StakeDelegation, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
Source§impl StakeDelegation
impl StakeDelegation
pub fn stake_credential(&self) -> StakeCredential
pub fn pool(&self) -> Ed25519KeyHash
pub fn new(stake_credential: &StakeCredential, pool: &Ed25519KeyHash) -> Self
Trait Implementations§
Source§impl AsRef<StakeDelegation> for StakeDelegation
impl AsRef<StakeDelegation> for StakeDelegation
Source§fn as_ref(&self) -> &StakeDelegation
fn as_ref(&self) -> &StakeDelegation
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for StakeDelegation
impl Clone for StakeDelegation
Source§fn clone(&self) -> StakeDelegation
fn clone(&self) -> StakeDelegation
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 StakeDelegation
impl Debug for StakeDelegation
Source§impl From<StakeDelegation> for JsValue
impl From<StakeDelegation> for JsValue
Source§fn from(value: StakeDelegation) -> Self
fn from(value: StakeDelegation) -> Self
Converts to this type from the input type.
Source§impl From<StakeDelegation> for StakeDelegation
impl From<StakeDelegation> for StakeDelegation
Source§fn from(native: StakeDelegation) -> Self
fn from(native: StakeDelegation) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for StakeDelegation
impl FromWasmAbi for StakeDelegation
Source§impl Into<StakeDelegation> for StakeDelegation
impl Into<StakeDelegation> for StakeDelegation
Source§fn into(self) -> StakeDelegation
fn into(self) -> StakeDelegation
Converts this type into the (usually inferred) input type.
Source§impl IntoWasmAbi for StakeDelegation
impl IntoWasmAbi for StakeDelegation
Source§impl LongRefFromWasmAbi for StakeDelegation
impl LongRefFromWasmAbi for StakeDelegation
Source§impl OptionFromWasmAbi for StakeDelegation
impl OptionFromWasmAbi for StakeDelegation
Source§impl OptionIntoWasmAbi for StakeDelegation
impl OptionIntoWasmAbi for StakeDelegation
Source§impl RefFromWasmAbi for StakeDelegation
impl RefFromWasmAbi for StakeDelegation
Source§type Anchor = RcRef<StakeDelegation>
type Anchor = RcRef<StakeDelegation>
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 StakeDelegation
impl RefMutFromWasmAbi for StakeDelegation
Source§impl TryFromJsValue for StakeDelegation
impl TryFromJsValue for StakeDelegation
Source§impl VectorFromWasmAbi for StakeDelegation
impl VectorFromWasmAbi for StakeDelegation
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[StakeDelegation]>
Source§impl VectorIntoJsValue for StakeDelegation
impl VectorIntoJsValue for StakeDelegation
fn vector_into_jsvalue(vector: Box<[StakeDelegation]>) -> JsValue
Source§impl VectorIntoWasmAbi for StakeDelegation
impl VectorIntoWasmAbi for StakeDelegation
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[StakeDelegation]>) -> Self::Abi
Source§impl WasmDescribeVector for StakeDelegation
impl WasmDescribeVector for StakeDelegation
impl SupportsConstructor for StakeDelegation
impl SupportsInstanceProperty for StakeDelegation
impl SupportsStaticProperty for StakeDelegation
Auto Trait Implementations§
impl Freeze for StakeDelegation
impl RefUnwindSafe for StakeDelegation
impl Send for StakeDelegation
impl Sync for StakeDelegation
impl Unpin for StakeDelegation
impl UnwindSafe for StakeDelegation
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.