Expand description
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.
Macros§
- Result
Result!()macro- Result
EnvLog - Result
Log - Throws
- This is for trait’s associated type that is an error.
Don’t use it in cex function signature, use
Result!(). - Throws
EnvLog - This is for trait’s associated type that is an error.
Don’t use it in cex function signature, use
Result!(). - Throws
Log - This is for trait’s associated type that is an error.
Don’t use it in cex function signature, use
Result!().
Attribute Macros§
- cex
- tag an
fnwith#[cex]to: - cex_
env_ log - tag an
fnwith#[cex_env_log]to: - cex_log
- tag an
fnwith#[cex_log]to:
Derive Macros§
- Logger
- Implements
cex::Loggerfor anenum.