Enum rustfmt_nightly::macros::MacroArgKind [−][src]
enum MacroArgKind {
MetaVariable(Symbol, String),
Repeat(DelimToken, Vec<ParsedMacroArg>, Option<Box<ParsedMacroArg>>, Token),
Delimited(DelimToken, Vec<ParsedMacroArg>),
Separator(String, String),
Other(String, String),
}
Variants
e.g., $x: expr
.
Repeat(DelimToken, Vec<ParsedMacroArg>, Option<Box<ParsedMacroArg>>, Token)
e.g., $($foo: expr),*
Tuple Fields of Repeat
0: DelimToken
()
, []
or {}
.
1: Vec<ParsedMacroArg>
Inner arguments inside delimiters.
2: Option<Box<ParsedMacroArg>>
Something after the closing delimiter and the repeat token, if available.
3: Token
The repeat token. This could be one of *
, +
or ?
.
Delimited(DelimToken, Vec<ParsedMacroArg>)
e.g., [derive(Debug)]
Tuple Fields of Delimited
0: DelimToken
1: Vec<ParsedMacroArg>
A possible separator. e.g., ,
or ;
.
Other random stuff that does not fit to other kinds.
e.g., == foo
in ($x: expr == foo)
.
Implementations
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for MacroArgKind
impl !Send for MacroArgKind
impl !Sync for MacroArgKind
impl Unpin for MacroArgKind
impl !UnwindSafe for MacroArgKind
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 64 bytes
Size for each variant:
MetaVariable
: 31 bytesRepeat
: 63 bytesDelimited
: 31 bytesSeparator
: 55 bytesOther
: 55 bytes