pub trait TryFromPLA<T> {
    type ExtraInfo<'a>;

    // Required method
    fn try_from_pla_with(
        val: &T,
        extra_info: Self::ExtraInfo<'_>
    ) -> Result<Self, TryFromPLAError>
       where Self: Sized;
}
Expand description

Convert a plutus-ledger-api type to its cardano-serialization-lib counterpart try_to_csl_with accepts extra data where the PLA data itself is not enough

Required Associated Types§

Required Methods§

source

fn try_from_pla_with( val: &T, extra_info: Self::ExtraInfo<'_> ) -> Result<Self, TryFromPLAError>
where Self: Sized,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TryFromPLA<i64> for Int

source§

impl TryFromPLA<u64> for BigNum

source§

impl TryFromPLA<BTreeMap<TokenName, BigInt>> for Assets

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &BTreeMap<TokenName, BigInt>, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<BTreeMap<TokenName, BigInt>> for MintAssets

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &BTreeMap<TokenName, BigInt>, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<Vec<(PlutusData, PlutusData)>> for PlutusMap

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &Vec<(PlutusData, PlutusData)>, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<Vec<PlutusData>> for PlutusList

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &Vec<PlutusData>, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<Vec<TransactionInput>> for TransactionInputs

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &Vec<TransactionInput>, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<BigInt> for u32

source§

impl TryFromPLA<BigInt> for BigInt

source§

impl TryFromPLA<BigInt> for BigNum

source§

impl TryFromPLA<BigInt> for Int

source§

impl TryFromPLA<Address> for Address

§

type ExtraInfo<'a> = u8

source§

fn try_from_pla_with( val: &Address, network_tag: u8 ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<AssocMap<StakingCredential, BigInt>> for Withdrawals

§

type ExtraInfo<'a> = u8

source§

fn try_from_pla_with( val: &AssocMap<StakingCredential, BigInt>, network_tag: u8 ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<CertificateIndex> for BigNum

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &CertificateIndex, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<ChainPointer> for Pointer

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with(val: &ChainPointer, _: ()) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<Credential> for Credential

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with(val: &Credential, _: ()) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<Datum> for PlutusData

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with(val: &Datum, _: ()) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<DatumHash> for DataHash

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with(val: &DatumHash, _: ()) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<Ed25519PubKeyHash> for Ed25519KeyHash

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &Ed25519PubKeyHash, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<MintingPolicyHash> for PolicyID

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &MintingPolicyHash, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<OutputDatum> for Option<OutputDatum>

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( pla_output_datum: &OutputDatum, _: () ) -> Result<Option<OutputDatum>, TryFromPLAError>

source§

impl TryFromPLA<PlutusData> for PlutusData

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with(val: &PlutusData, _: ()) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<Redeemer> for Redeemer

§

type ExtraInfo<'a> = (&'a RedeemerTag, u64)

source§

fn try_from_pla_with( pla_redeemer: &Redeemer, (red_tag, red_idx): Self::ExtraInfo<'_> ) -> Result<Redeemer, TryFromPLAError>

source§

impl TryFromPLA<ScriptHash> for ScriptHash

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with(val: &ScriptHash, _: ()) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<Slot> for BigNum

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with(val: &Slot, _: ()) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<StakingCredential> for Credential

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &StakingCredential, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<StakingCredential> for RewardAddress

§

type ExtraInfo<'a> = u8

source§

fn try_from_pla_with( val: &StakingCredential, network_tag: u8 ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<TokenName> for AssetName

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with(val: &TokenName, _: ()) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<TransactionHash> for TransactionHash

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &TransactionHash, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<TransactionIndex> for BigNum

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &TransactionIndex, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<TransactionInput> for TransactionInput

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with( val: &TransactionInput, _: () ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<TransactionOutput> for TransactionOutput

§

type ExtraInfo<'a> = TransactionOutputExtraInfo<'a>

source§

fn try_from_pla_with( val: &TransactionOutput, extra_info: TransactionOutputExtraInfo<'_> ) -> Result<Self, TryFromPLAError>

source§

impl TryFromPLA<Value> for Value

§

type ExtraInfo<'a> = ()

source§

fn try_from_pla_with(val: &Value, _: ()) -> Result<Self, TryFromPLAError>

Implementors§