pub struct PluginMetadata {
pub id: String,
pub name: String,
pub version: String,
pub description: String,
pub plugin_type: PluginType,
pub priority: PluginPriority,
pub dependencies: Vec<String>,
pub capabilities: Vec<String>,
pub author: Option<String>,
}Expand description
插件元数据
Fields§
§id: String插件唯一标识
name: String插件名称
version: String插件版本
description: String插件描述
plugin_type: PluginType插件类型
priority: PluginPriority插件优先级
dependencies: Vec<String>依赖的其他插件 ID
capabilities: Vec<String>插件能力标签
插件作者
Implementations§
Source§impl PluginMetadata
impl PluginMetadata
pub fn new(id: &str, name: &str, plugin_type: PluginType) -> Self
pub fn with_version(self, version: &str) -> Self
pub fn with_description(self, desc: &str) -> Self
pub fn with_priority(self, priority: PluginPriority) -> Self
pub fn with_dependency(self, dep_id: &str) -> Self
pub fn with_capability(self, cap: &str) -> Self
Trait Implementations§
Source§impl Clone for PluginMetadata
impl Clone for PluginMetadata
Source§fn clone(&self) -> PluginMetadata
fn clone(&self) -> PluginMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PluginMetadata
impl Debug for PluginMetadata
Source§impl<'de> Deserialize<'de> for PluginMetadata
impl<'de> Deserialize<'de> for PluginMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PluginMetadata
impl RefUnwindSafe for PluginMetadata
impl Send for PluginMetadata
impl Sync for PluginMetadata
impl Unpin for PluginMetadata
impl UnsafeUnpin for PluginMetadata
impl UnwindSafe for PluginMetadata
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