Trait BindleContent

Source
pub trait BindleContent:
    StrictSerialize
    + StrictDeserialize
    + StrictDumb {
    type Id: Copy + Eq + Debug + Display + FromStr<Err = Baid58ParseError> + StrictType + StrictDumb + StrictEncode + StrictDecode;

    const MAGIC: [u8; 4];
    const PLATE_TITLE: &'static str;

    // Required method
    fn bindle_id(&self) -> Self::Id;

    // Provided methods
    fn bindle_headers(&self) -> BTreeMap<&'static str, String> { ... }
    fn bindle(self) -> Bindle<Self> { ... }
    fn bindle_mnemonic(&self) -> Option<String> { ... }
}

Required Associated Constants§

Source

const MAGIC: [u8; 4]

Magic bytes used in saving/restoring container from a file.

Source

const PLATE_TITLE: &'static str

String used in ASCII armored blocks

Required Associated Types§

Required Methods§

Source

fn bindle_id(&self) -> Self::Id

Provided Methods§

Source

fn bindle_headers(&self) -> BTreeMap<&'static str, String>

Source

fn bindle(self) -> Bindle<Self>

Source

fn bindle_mnemonic(&self) -> Option<String>

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.

Implementors§

Source§

impl BindleContent for Iface

Source§

const MAGIC: [u8; 4]

Source§

const PLATE_TITLE: &'static str = "RGB INTERFACE"

Source§

type Id = IfaceId

Source§

impl BindleContent for IfaceImpl

Source§

const MAGIC: [u8; 4]

Source§

const PLATE_TITLE: &'static str = "RGB INTERFACE IMPLEMENTATION"

Source§

type Id = ImplId

Source§

impl BindleContent for Contract

Source§

const MAGIC: [u8; 4]

Source§

const PLATE_TITLE: &'static str = "RGB CONTRACT"

Source§

type Id = ContractId

Source§

impl BindleContent for Transfer

Source§

const MAGIC: [u8; 4]

Source§

const PLATE_TITLE: &'static str = "RGB STATE TRANSFER"

Source§

type Id = TransferId

Source§

impl<Root: SchemaRoot> BindleContent for Schema<Root>

Source§

const MAGIC: [u8; 4]

Source§

const PLATE_TITLE: &'static str = "RGB SCHEMA"

Source§

type Id = SchemaId