Expand description
This crate is a collection of ligthweight procedural macros typically used for writing others,either procedural or not,as such covers some of the missing features you might expect from macro_rules! like expansion bucles controlled by you and not an input.Or guarantee an identifier is borrowed in the manner you want over any other,included own.
This crate is no_std.
Macros§
- Stringify
- Stringify the input.
- as_
mut_ ref_ token - Ensures that the reference or identifier passed is mutable and changes it if is not.
- as_
ref_ token - Ensures that the reference or identifier passed is shared and changes it if is not.
- count_
spec_ tokens - Expands to the number of spec tokens you pass in tokens => spec syntax,useful when expanding expansion bucles with a given separator matched in spec;to retrieve the number of expansions,as it have more precedence than the other macros.
- count_
tokens - Expands to the number of tokens you pass.
- eval_
encoded - Eval encoded strings that maybe are from other macros.
- expansion_
bucle - An expansion bucle with syntax code => num when num is the number of times the code should be expanded.
- expansion_
bucle_ counted - An expansion bucle with syntax code => num when num is the number of times the code should be expanded along with a replacement of the rep_count imaginary variable at each “iteration” with values from 0 thought num-1.
- proto
- This macro panics with the message “Prototype reached ‘tokens’.” where tokens are the tokens passed.