pub struct AttrItemWithExtra {
pub imported_item: Item,
pub tokens_ident: TokenStream,
pub source_path: TokenStream,
pub custom_tokens: TokenStream,
/* private fields */
}Expand description
Used to parse args passed to the inner pro macro auto-generated by
import_tokens_attr_internal.
You shouldn’t need to use this directly.
Fields§
§imported_item: ItemContains the Item that is being imported (i.e. the item whose tokens we are
obtaining)
tokens_ident: TokenStreamA TokenStream2 representing the raw tokens for the Ident the generated
macro will use to refer to the tokens argument of the macro.
source_path: TokenStreamRepresents the path of the item that is being imported.
custom_tokens: TokenStreamwhen #[with_custom_parsing(..)] is used, the variable __custom_tokens will be
populated in the resulting proc macro containing the raw TokenStream2 for the
tokens before custom parsing has been applied. This allows you to make use of any extra
context information that may be obtained during custom parsing that you need to utilize
in the final macro.