Function to_datum_cbor_bytes

Source
pub fn to_datum_cbor_bytes<T: ToDatum>(msg: T) -> Vec<u8> 
Expand description

Encodes a message as a Plutus Datum and returns CBOR encoding of this datum.

tip: this function accepts Option<T> for any T: Datum so it’s better to call it with explicit type to avoid hard to find bugs when types change