pub trait AsPlutus: Sized {
// Required methods
fn from_plutus(data: PlutusData) -> Result<Self, DecodeError>;
fn to_plutus(self) -> PlutusData;
// Provided methods
fn from_plutus_bytes(bytes: &[u8]) -> Result<Self, DecodeError> { ... }
fn to_plutus_bytes(self) -> Vec<u8> ⓘ { ... }
fn vec_from_plutus(data: PlutusData) -> Result<Vec<Self>, DecodeError> { ... }
fn vec_to_plutus(value: Vec<Self>) -> PlutusData { ... }
}Required Methods§
fn from_plutus(data: PlutusData) -> Result<Self, DecodeError>
fn to_plutus(self) -> PlutusData
Provided Methods§
fn from_plutus_bytes(bytes: &[u8]) -> Result<Self, DecodeError>
fn to_plutus_bytes(self) -> Vec<u8> ⓘ
fn vec_from_plutus(data: PlutusData) -> Result<Vec<Self>, DecodeError>
fn vec_to_plutus(value: Vec<Self>) -> PlutusData
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.