Crate mac

Source
Expand description

§mac

A collection of great and ubiqutitous macros.

Modules§

cfg
Macros for conditional compilation.
format
Macros for string formatting.
inspect
Inspect Macros
matches
Pattern Matching macros.
mem
Macros for low-level memory manipulation.
syntax_ext
Macros useful when writing procedural syntax extensions.
test
Macros for writing test suites.

Macros§

addrs_of
Make a tuple of the addresses of some of a struct’s fields.
do_while
Do-while loop.
ext_bail
Call span_err on an ExtCtxt and return DummyResult::any.
ext_bail_if
ext_bail! if the condition $e is true.
ext_expect
Unwrap the Option $e, or ext_bail!.
format_if
Conditionally perform string formatting.
if_cfg
Compile-time conditional expression.
inspect
Evaluates an expression, prints a stringified version of the expression along with the evaluated value, and then returns that value.
match_cfg
Compile-time matching on config variables.
matches
Returns true if an expression matches a pattern.
test_eq
Generate a test function $name which asserts that $left and $right are equal.
unwrap_or_return
Unwraps an Option or returns from the function with the specified return value.