macrofied-toolbox
This library provides an ergonomic experience of adding debugging messages to rust's
Result<T,E>
and Option<T>
patterns
Just like the cli-toolbox
crate, that the debug logic
is based on, this is not a logging alternative; it's intended to produce debugging output to be
used during application development.
Although the macros were designed to make debugging more ergonomic, they include variations that do not include debugging to provide coding consistency, so you have the option use the same syntax consistently throughout your crate.
Result<T,E>
use File;
use io;
use ;
use result;
use debug;
Option<T>
.
.
.
* the macros are automatically generated with custom build scripts, including their docs
and tests
Resources
Usage
Each macro is gated by a feature.
No feature is mutually exclusive and can be combined as needed.
[]
= { = "0.1", = ["option", "result"] }
Additional Feature
macrofied-toolbox
can optionally use the cli-toolbox
crate to output
debug to the console by enabling an of these features
debug-all
- enables console debugging for all the features enableddebug-option
- enables console debugging for theoption!
macrodebug-result
- enables console debugging for theresult!
macro
Roadmap
-
option!
- handles anOption<T>
of an expression - enhance
result!
- pass
Ok<t>
value through - add
?
syntax
- pass
- support more than mutable
Ok<T>
values - debugging for
Ok<T>
values - logging for both
Ok<T>
andErr<E>
- other patterns?
Implemented
-
result!
- handles aResult<T,E>
of an expression