[−][src]Trait aspect::Weave
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
The parameters of the macro attribute triggering the weaving, i.e the attributes passed by the compiler to your custom procedural macro.
Required methods
fn update_fn_block(
fn_def: &ImplItemMethod,
main_attr: &Self::MacroAttributes,
fn_attr: &[Rc<Self::Type>]
) -> Result<Block, Error>
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
fn parse_macro_attributes(
attrs: TokenStream
) -> Result<Self::MacroAttributes, Error>
attrs: TokenStream
) -> Result<Self::MacroAttributes, Error>
Parse the main macro attributes.
The default implementation should work out-of-the-box.