pub struct PluginMeta {
pub name: &'static str,
pub description: &'static str,
pub version: &'static str,
pub author: &'static str,
pub sdk: PluginSdkVersion,
}Expand description
Human-readable plugin metadata (CLI, docs, introspection).
Fields§
§name: &'static strDisplay name (defaults to plugin id).
description: &'static strOne-line description of what the plugin does.
version: &'static strPlugin crate / package version (not SDK), e.g. env!("CARGO_PKG_VERSION").
Optional author / maintainer.
sdk: PluginSdkVersionPlugin SDK version this plugin was written against.
Implementations§
Source§impl PluginMeta
impl PluginMeta
Sourcepub fn new(name: &'static str) -> Self
pub fn new(name: &'static str) -> Self
Start a builder with a display name; SDK defaults to PLUGIN_SDK_VERSION.
Sourcepub fn for_id(id: &'static str) -> Self
pub fn for_id(id: &'static str) -> Self
Minimal meta for plugins that only set Plugin::id.
pub fn description(self, description: &'static str) -> Self
pub fn version(self, version: &'static str) -> Self
pub fn sdk(self, sdk: PluginSdkVersion) -> Self
Trait Implementations§
Source§impl Clone for PluginMeta
impl Clone for PluginMeta
Source§fn clone(&self) -> PluginMeta
fn clone(&self) -> PluginMeta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PluginMeta
impl RefUnwindSafe for PluginMeta
impl Send for PluginMeta
impl Sync for PluginMeta
impl Unpin for PluginMeta
impl UnsafeUnpin for PluginMeta
impl UnwindSafe for PluginMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more