holochain / holochain/holochain
[Enhancement] Define a conversion from `AppEntryDef` to `UnitEntryTypes` (or vice versa)
Open
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 193
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 18
Description
The need: I want to compare a `Create` or `Update` action against an expected entry type, but without having to retrieve the entry data from the DHT and try to deserialise it into the expected type. Currently I have to do some convoluted stuff to turn a `UnitEntryTypes` value in order to compare it against the `AppEntryDef` in the action struct -- extract the zome and entry type indexes from the `UnitEntryTypes` value.
It'd be great if the macro defined an `impl TryInto` for the enum, or some other such easy conversion.
Contributor guide
Assessment
This issue has not been assessed yet.