| Crates.io | try_from_expr_derive |
| lib.rs | try_from_expr_derive |
| version | 0.1.1 |
| created_at | 2025-08-17 02:21:24.768702+00 |
| updated_at | 2025-12-24 20:11:45.386166+00 |
| description | Derive macro for try_from_expr - generates TryFrom<&syn::Expr> implementations |
| homepage | |
| repository | https://github.com/rymskip/try_from_expr |
| max_upload_size | |
| id | 1799053 |
| size | 66,945 |
The procedural macro implementation for try_from_expr. This crate provides the
TryFromExpr derive macro.
This crate is typically not used directly. Instead, use the main try_from_expr
crate which re-exports this macro:
[dependencies]
try_from_expr = "0.1.0"
This crate implements the TryFromExpr derive macro that generates
TryFrom<&syn::Expr> implementations for enums. It handles:
The macro distinguishes between two types of enums:
Leaf Enums: Enums with concrete values
Wrapper Enums: Enums that contain other enum types
For each enum, the macro generates:
TryFrom<&syn::Expr> implementationMIT