holochain / holochain/holochain

[Enhancement] Define a conversion from `AppEntryDef` to `UnitEntryTypes` (or vice versa)

Open
#4,635 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.