plugin

Attribute Macro plugin 

Source
#[plugin]
Expand description

A procedural macro attribute for generating an asynchronous and callable version of a trait on the host side.

This procedural macro generates an asynchronous version of the provided trait by wrapping its methods with async equivalents. It also generates a struct that implements the asynchronous version of the trait and provides a way to call the wrapped methods asynchronously.

§Arguments

This macro takes no arguments directly. It operates on the trait provided in the input token stream.

§Examples

#[plugy_macros::plugin]
pub trait MyTrait {
    fn sync_method(&self, param: u32) -> u32;
}