#[macro_export]
macro_rules! generic_raw {
($name:ident => $handler:ident) => {
#[cfg_attr(not(target_family = "wasm"), async_trait::async_trait)]
#[cfg_attr(target_family = "wasm", async_trait::async_trait(?Send))]
impl $name::Operation for Component {
type Error = wick_component::AnyError;
type Inputs = $name::Inputs;
type Outputs = $name::Outputs;
type Config = $name::Config;
async fn $name(
inputs: Self::Inputs,
outputs: Self::Outputs,
ctx: Context<Self::Config>,
) -> Result<(), Self::Error> {
$handler(inputs, outputs, ctx).await
}
}
};
}