virtue
virtue copied to clipboard
A sinless derive helper
My use case is the following: I would like to derive a macro for my enum and then for each struct-field variant generate an identical struct which the same attributes...
Thanks for virtue, it works nicely for my purposes parsing SSH binary protocol. I'm using enum variant attributes that can have `Ident`s in them such as `#[sshwire(variant = SSH_NAME_ED25519)]`, where...
it would be nice to be able to generate compile-time checks. These are usually in the form of: ```rs const _: () = { if !some_check() { panic!(""); }}; ```...
When implementing generics, I found an oversight in enum generation: ```rust generator .generate_enum("Foo") .add_value("Bar") .add_pub_field("bar", "u32"); // Generates: enum Foo { Bar { pub bar: u32 } } ``` This...