partial-enum

Crates.iopartial-enum
lib.rspartial-enum
version0.0.4
sourcesrc
created_at2022-11-18 17:25:59.82269
updated_at2022-11-23 19:15:41.669979
descriptionproc-macro generating partially inhabited enums
homepagehttps://github.com/maximelenoir/partial-enum
repositoryhttps://github.com/maximelenoir/partial-enum
max_upload_size
id718026
size20,826
Maxime Lenoir (maximelenoir)

documentation

https://docs.rs/partial-enum

README

Experimental proc-macro generating partially inhabited enums from a template enum and valid morphisms between those enums. The goal is to define an enum with all possible variants once and generate the partial enums to constrain different APIs to different variant subsets, without having to redefine new enums for each API. Generated morphisms can then be used to convert between those different enums and easily compose APIs.

Commit count: 12

cargo fmt