Struct macrohelper::MacroInput
[−]
[src]
pub struct MacroInput { pub attr: Vec<HashTag>, pub id: String, pub body: BodyKind, }
Input to a macro1.1 invocation
Macro1.1 compiler hook gives a string of tokens. That is converted to an AST by syn
.
This crate then converts syn
's output into this type.
Fields
attr: Vec<HashTag>
Information about any and all #[...]
headers
id: String
Name of the structure or enum
body: BodyKind
Informatin about the body
Methods
impl MacroInput
[src]
fn from_tree(input: TokenStream) -> Result<MacroInput, String>
High level fake implemenation.
Just converts TokenStream
to a string, and called from_str
fn from_str(s: &str) -> Result<MacroInput, String>
Actual implementation of the conversion
Trait Implementations
impl Clone for MacroInput
[src]
fn clone(&self) -> MacroInput
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more