pub struct PluginMeta {
name: String,
version: String,
description: String,
authors: String,
state: PluginState,
execution: ExecutionContext,
}Expand description
Metadata about a plugin.
Constructed via the builder pattern: PluginMeta::new followed by
optional chained setters. Generic fields (name, version, description,
authors) are sourced automatically from Cargo.toml via env!() macros
so that plugin authors don’t have to duplicate them.
Fields§
§name: String§version: String§description: String§state: PluginState§execution: ExecutionContextImplementations§
Source§impl PluginMeta
impl PluginMeta
Sourcepub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
Create metadata with a plugin name and version. All other fields start at sensible defaults (ephemeral state, exclusive execution).
Sourcepub fn with_description(self, d: impl Into<String>) -> Self
pub fn with_description(self, d: impl Into<String>) -> Self
Set a human-readable description of what the plugin does.
Set the plugin author(s), typically sourced from Cargo.toml.
Sourcepub fn with_state(self, s: PluginState) -> Self
pub fn with_state(self, s: PluginState) -> Self
Set the plugin’s lifecycle behavior (persistent, ephemeral, or scoped).
Sourcepub fn with_execution(self, e: ExecutionContext) -> Self
pub fn with_execution(self, e: ExecutionContext) -> Self
Set the concurrency model the daemon should use when dispatching tasks.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
A short description of what the plugin does. May be empty.
The plugin author(s). May be empty.
Sourcepub fn state(&self) -> PluginState
pub fn state(&self) -> PluginState
How the daemon manages this plugin’s lifetime between tasks.
Sourcepub fn execution(&self) -> ExecutionContext
pub fn execution(&self) -> ExecutionContext
How the daemon schedules concurrent tasks for this plugin.
Trait Implementations§
Source§impl Clone for PluginMeta
impl Clone for PluginMeta
Source§fn clone(&self) -> PluginMeta
fn clone(&self) -> PluginMeta
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PluginMeta
impl Debug for PluginMeta
Source§impl PartialEq for PluginMeta
impl PartialEq for PluginMeta
impl StructuralPartialEq for PluginMeta
Auto 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].