Attribute Macro io_plugin::io_plugin

source ·
#[io_plugin]
Expand description

Generate a plugin-interface, based on an enum definition for its’ operations From the plugin’s perspective - input types are all fields except the last one, and the output type is the last one (of course - you can use tuples to output multiple values).

The provided enum’s variant must contain only owned data (no &’a) - otherwise, deserialiastaion will cause a compile-time error. The variants must be [serde::Serialize] + [serde::Deserialize].

Note that the enum this attribute applies to won’t exist.
Instead, there will be a message enum, response enum, plugin trait, plugin handle (a struct) - postfixed with the highlighted words.