Trait hdi_extensions::ScopedTypeConnector

source ·
pub trait ScopedTypeConnector<T, U>
where ScopedEntryDefIndex: for<'a> TryFrom<&'a T, Error = WasmError>,
{ // Required methods fn unit() -> U; fn app_entry_def() -> AppEntryDef; fn check_record_entry_type(record: &Record) -> bool; fn try_from_record(record: &Record) -> Result<Self, Self::Error> where Self: TryFrom<Record>; fn to_input(&self) -> T; }
Expand description

Methods for getting scoped-type info from an entry struct

Required Methods§

source

fn unit() -> U

Get this entry’s corresponding unit enum

source

fn app_entry_def() -> AppEntryDef

Get this entry’s AppEntryDef

source

fn check_record_entry_type(record: &Record) -> bool

Check if a Record’s entry type matches this entry

source

fn try_from_record(record: &Record) -> Result<Self, Self::Error>
where Self: TryFrom<Record>,

Deserialize a Record’s Entry into this struct

source

fn to_input(&self) -> T

Wrap this entry in the corresponding entry type enum

Object Safety§

This trait is not object safe.

Implementors§