Skip to main content

Crate standard_plugin_macros

Crate standard_plugin_macros 

Source
Expand description

#[ui] and #[daemon]: export a plugin type as the ui-plugin or daemon-plugin world of standard:plugin@2.0.0.

Use them through standard-plugin-sdk as #[standard_plugin::ui] and #[standard_plugin::daemon]. Put the attribute on the plugin type’s definition (a struct or enum) or on its impl UiPlugin for ... / impl DaemonPlugin for ... block, once per plugin crate. The attribute leaves the item unchanged and adds the component exports, which the SDK’s runtime forwards to the trait methods.

Attribute Macros§

daemon
Exports the annotated type, which implements standard_plugin::daemon::DaemonPlugin, as the plugin’s daemon-plugin world.
ui
Exports the annotated type, which implements standard_plugin::UiPlugin, as the plugin’s ui-plugin world.