Macro pliron::impl_op_interface
source ยท macro_rules! impl_op_interface { ($intr_name:ident for $op_name:ident { $($tt:tt)* }) => { ... }; }
Expand description
Implement an Op Interface for an Op. The interface trait must define
a verify function with type OpInterfaceVerifier
Usage:
#[def_op("dialect.name")]
struct MyOp {};
decl_op_interface! {
MyOpInterface {
fn gubbi(&self);
fn verify(op: &dyn Op, ctx: &Context) -> Result<()>
where Self: Sized,
{
Ok(())
}
}
}
impl_op_interface!(
MyOpInterface for MyOp
{
fn gubbi(&self) { println!("gubbi"); }
}
);