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