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