pub trait OpHelper {
// Required method
fn flattened<ET, LT>(&self) -> Result<FlatOp<ET, LT>, WasmError>
where ET: EntryTypesHelper + UnitEnum,
<ET as UnitEnum>::Unit: Into<ZomeTypesKey<EntryDefIndex>>,
LT: LinkTypesHelper,
WasmError: From<<ET as EntryTypesHelper>::Error> + From<<LT as LinkTypesHelper>::Error>;
}Expand description
This trait provides a conversion to a convenience type FlatOp
for use in the validation call back.
Not all data is available in the FlatOp. This is why the Op
is not taken by value and can still be used after this conversion.
There is data that is common to all ops and can be accessed via helpers on the op.
- Get the
Op::author()of the op. - Get the
Op::timestamp()for when the op was created. - Get the
Op::action_seq()of the op. - Get the
Op::prev_action()of the op. - Get the
Op::action_type()of the op.
Required Methods§
Sourcefn flattened<ET, LT>(&self) -> Result<FlatOp<ET, LT>, WasmError>where
ET: EntryTypesHelper + UnitEnum,
<ET as UnitEnum>::Unit: Into<ZomeTypesKey<EntryDefIndex>>,
LT: LinkTypesHelper,
WasmError: From<<ET as EntryTypesHelper>::Error> + From<<LT as LinkTypesHelper>::Error>,
fn flattened<ET, LT>(&self) -> Result<FlatOp<ET, LT>, WasmError>where
ET: EntryTypesHelper + UnitEnum,
<ET as UnitEnum>::Unit: Into<ZomeTypesKey<EntryDefIndex>>,
LT: LinkTypesHelper,
WasmError: From<<ET as EntryTypesHelper>::Error> + From<<LT as LinkTypesHelper>::Error>,
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.