Trait aspect::Weave [−][src]
A trait to “Weave” an impl
block, that is update each annotated method with your custom logic
This trait extends Synattra’s ParseAttributes
that parses custom, non-macro attributes that are attached to the impl
block or methods.
Associated Types
type MacroAttributes: Parse
[src]
The parameters of the macro attribute triggering the weaving, i.e the attributes passed by the compiler to your custom procedural macro.
Required methods
pub fn update_fn_block(
fn_def: &ImplItemMethod,
main_attr: &Self::MacroAttributes,
fn_attr: &[Rc<Self::Type>]
) -> Result<Block, Error>
[src]
fn_def: &ImplItemMethod,
main_attr: &Self::MacroAttributes,
fn_attr: &[Rc<Self::Type>]
) -> Result<Block, Error>
A callback that lets you alter the blocks of intercepted methods.
Provided methods
pub fn parse_macro_attributes(
attrs: TokenStream
) -> Result<Self::MacroAttributes, Error>
[src]
attrs: TokenStream
) -> Result<Self::MacroAttributes, Error>
Parse the main macro attributes.
The default implementation should work out-of-the-box.