10 releases (5 breaking)
| 0.5.2 | Apr 4, 2021 |
|---|---|
| 0.5.1 | Feb 18, 2021 |
| 0.5.0 | Nov 2, 2020 |
| 0.4.0 | Jun 28, 2020 |
| 0.1.0 | Nov 21, 2018 |
#21 in #throw
76 downloads per month
Used in 5 crates
(via cex)
37KB
624 lines
The cex_derive crate provides the proc-macro implementation for the cex crate.
See cex crate's doc ../cex/README.md for more.
Licensed under MIT.
lib.rs:
This crate is the proc-macro implementation for cex crate.
Features
-
Result!( OkType throws A,B,... )which is equivalant toResult<OkType, enumx::Enum!(A,B,...)> -
ret!() Ok Type or Result
-
throw!() Error Types listed in throws
-
#[ty_pat] match, which enables "using types as patterns in match arms". -
#[cex] let local_var: pattern = expression;, which enables all the mentioned features in the expression, e.g try blocks. -
#[cex]on closures, which enables all the mentioned features in the closure. -
#[cex] fn, which enables all the mentioned features in the function. -
cex::Loggerderive for enum.
See more details in cex crate's documents.
Dependencies
~2.5MB
~53K SLoC