Expand description
14 utility macros for assertions, collections, range-checks,
and string operations. Available in no_std.
Utility macros that eliminate common Rust boilerplate.
Macros marked no_std work without the std feature.
Macros marked std require the std feature.
§Available macros
| Macro | Requires | Description |
|---|---|---|
cmn_assert | no_std | Checks if the given expression is true. |
cmn_contains | no_std | Checks if the given string contains the given substring. |
cmn_in_range | no_std | Checks if the given value is in the given range. |
cmn_max | no_std | Returns the maximum of the given values. |
cmn_min | no_std | Returns the minimum of the given values. |
cmn_to_num | no_std | Converts the given string to a number. |
cmn_constants | no_std | Defines a set of f64 constants. |
cmn | std | Parses arguments via Common::parse. |
cmn_parse | std | Parses the given input into a Rust value. |
cmn_join | std | Joins strings together. |
cmn_split | std | Splits a string into a vector of words. |
cmn_vec | std | Creates a new vector with the given elements. |
cmn_map | std | Creates a new map of the given key-value pairs. |
cmn_print | std | Prints the arguments to the console. |
cmn_print_vec | std | Prints a vector of elements to the console. |