from-enum 0.1.1

Provides a derive proc macro for deriving From on enums
Documentation
  • Coverage
  • 0%
    0 out of 1 items documented0 out of 0 items with examples
  • Size
  • Source code size: 3.71 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.83 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • JohnPeel/from-enum
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JohnPeel

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),
}