Crates.io | from-enum |
lib.rs | from-enum |
version | 0.1.1 |
source | src |
created_at | 2022-09-10 00:43:12.703666 |
updated_at | 2022-09-10 01:00:35.318135 |
description | Provides a derive proc macro for deriving From on enums |
homepage | |
repository | https://github.com/JohnPeel/from-enum |
max_upload_size | |
id | 662177 |
size | 2,837 |
It has the same interface as thiserror's #[from]
attribute, but it works in no-std.
use from_enum::From;
#[derive(From)]
enum MyEnum {
String(#[from] String),
Int(#[from] i32),
}