pub trait EntryTypesHelper: Sized {
    fn try_from_local_type<I>(
        type_index: I,
        entry: &Entry
    ) -> Result<Option<Self>, WasmError>
    where
        LocalZomeTypeId: From<I>
; fn try_from_global_type<I>(
        type_index: I,
        entry: &Entry
    ) -> Result<Option<Self>, WasmError>
    where
        GlobalZomeTypeId: From<I>
; }
Expand description

Helper trait for deserializing Entrys to the correct type.

This is implemented by the hdk_entry_defs proc_macro.

Required Methods

Check if the LocalZomeTypeId matches one of the Self LocalZomeTypeId’s and if it does deserialize the Entry into that types.

Check if the GlobalZomeTypeId maps to a LocalZomeTypeId declared by Self and if it does deserialize the Entry into that types.

Implementors