Trait ToDatum

Source
pub trait ToDatum {
    // Required method
    fn to_datum(&self) -> Datum;
}
Expand description

Trait for types that can be encoded as a Plutus Datum.

Required Methods§

Source

fn to_datum(&self) -> Datum

Encodes self to Datum.

Implementations on Foreign Types§

Source§

impl ToDatum for u16

Source§

fn to_datum(&self) -> Datum

Source§

impl ToDatum for u32

Source§

fn to_datum(&self) -> Datum

Source§

impl ToDatum for u64

Source§

fn to_datum(&self) -> Datum

Source§

impl ToDatum for u128

Source§

fn to_datum(&self) -> Datum

Source§

impl ToDatum for Vec<u8>

Source§

fn to_datum(&self) -> Datum

Source§

impl ToDatum for [u8]

Source§

fn to_datum(&self) -> Datum

Source§

impl<T> ToDatum for [T]
where T: ToDatum,

Source§

fn to_datum(&self) -> Datum

Source§

impl<T> ToDatum for Vec<T>
where T: ToDatum,

Source§

fn to_datum(&self) -> Datum

Source§

impl<T: ToDatum> ToDatum for Option<T>

Source§

fn to_datum(&self) -> Datum

Implementors§