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 Entrys 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".