Macro tt_call::parse_type [−][src]
macro_rules! parse_type { { $caller:tt input = [{ $($tt:tt)* }] } => { ... }; }
Expand description
Parse any syntactically valid Rust type. [tt-call]
This is the tt-call equivalent of Rust’s $:ty fragment.
Input
input = [{tokens}]
Output
type = [{tokens of type}]rest = [{remaining tokens after type}]
Example
use tt_call::{parse_type, tt_call, tt_debug}; fn main() { tt_call! { macro = [{ parse_type }] input = [{ Vec<u8>, compressed=false }] ~~> tt_debug } }
The output is:
type = [{ Vec < u8 > }]
rest = [{ , compressed = false }]