Trait kodept_macros::Macro

source ·
pub trait Macro {
    type Error: Into<ReportMessage>;
    type Node: TryFrom<AnyNode>;

    // Provided method
    fn transform(
        &mut self,
        guard: VisitGuard<'_, '_, Self::Node>,
        context: &mut impl Context,
    ) -> Execution<Self::Error, ChangeSet> { ... }
}

Required Associated Types§

Provided Methods§

source

fn transform( &mut self, guard: VisitGuard<'_, '_, Self::Node>, context: &mut impl Context, ) -> Execution<Self::Error, ChangeSet>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<M: Macro> Macro for &mut M

§

type Error = <M as Macro>::Error

§

type Node = <M as Macro>::Node

source§

fn transform( &mut self, guard: VisitGuard<'_, '_, Self::Node>, context: &mut impl Context, ) -> Execution<Self::Error, ChangeSet>

Implementors§

source§

impl<W: Write> Macro for ASTFormatter<W>

§

type Error = IOError

§

type Node = AnyNode