from-enum

Crates.iofrom-enum
lib.rsfrom-enum
version0.1.1
sourcesrc
created_at2022-09-10 00:43:12.703666
updated_at2022-09-10 01:00:35.318135
descriptionProvides a derive proc macro for deriving From on enums
homepage
repositoryhttps://github.com/JohnPeel/from-enum
max_upload_size
id662177
size2,837
John Peel (JohnPeel)

documentation

https://docs.rs/from-enum/latest/from-enum

README

from-enum

It has the same interface as thiserror's #[from] attribute, but it works in no-std.

Example

use from_enum::From;

#[derive(From)]
enum MyEnum {
    String(#[from] String),
    Int(#[from] i32),
}
Commit count: 1

cargo fmt