Trait holochain_state::prelude::EntryTypesHelper
source · pub trait EntryTypesHelper: Sized {
type Error;
// Required method
fn deserialize_from_type<Z, I>(
zome_index: Z,
entry_def_index: I,
entry: &Entry
) -> Result<Option<Self>, Self::Error>
where Z: Into<ZomeIndex>,
I: Into<EntryDefIndex>;
}
Expand description
Helper trait for deserializing Entry
s to the correct type.
This is implemented by the hdk_entry_types
proc_macro.
Required Associated Types§
Required Methods§
sourcefn deserialize_from_type<Z, I>(
zome_index: Z,
entry_def_index: I,
entry: &Entry
) -> Result<Option<Self>, Self::Error>
fn deserialize_from_type<Z, I>( zome_index: Z, entry_def_index: I, entry: &Entry ) -> Result<Option<Self>, Self::Error>
Check if the ZomeIndex
and EntryDefIndex
matches one of the
ZomeEntryTypesKey::from(Self::variant)
and if
it does deserialize the Entry
into that type.
Object Safety§
This trait is not object safe.