pub struct PluginInfo {Show 14 fields
pub id: String,
pub name: String,
pub version: PluginVersion,
pub description: String,
pub author: Option<String>,
pub library_path: Option<PathBuf>,
pub state: PluginState,
pub loaded_at: Option<u64>,
pub last_reload: Option<u64>,
pub reload_count: u32,
pub dependencies: Vec<String>,
pub capabilities: Vec<String>,
pub metadata: HashMap<String, String>,
pub file_hash: Option<String>,
}Expand description
Plugin information stored in registry
Fields§
§id: StringPlugin ID
name: StringPlugin name
version: PluginVersionPlugin version
description: StringPlugin description
Plugin author
library_path: Option<PathBuf>Library path
state: PluginStateCurrent state
loaded_at: Option<u64>Load timestamp
last_reload: Option<u64>Last reload timestamp
reload_count: u32Reload count
dependencies: Vec<String>Dependencies
capabilities: Vec<String>Capabilities/features
metadata: HashMap<String, String>Custom metadata
file_hash: Option<String>File hash (for change detection)
Implementations§
Source§impl PluginInfo
impl PluginInfo
Sourcepub fn new(id: &str, name: &str, version: PluginVersion) -> Self
pub fn new(id: &str, name: &str, version: PluginVersion) -> Self
Create new plugin info
Sourcepub fn with_description(self, desc: &str) -> Self
pub fn with_description(self, desc: &str) -> Self
Set description
Set author
Sourcepub fn with_library_path<P: AsRef<Path>>(self, path: P) -> Self
pub fn with_library_path<P: AsRef<Path>>(self, path: P) -> Self
Set library path
Sourcepub fn with_dependency(self, dep: &str) -> Self
pub fn with_dependency(self, dep: &str) -> Self
Add dependency
Sourcepub fn with_capability(self, cap: &str) -> Self
pub fn with_capability(self, cap: &str) -> Self
Add capability
Sourcepub fn with_metadata(self, key: &str, value: &str) -> Self
pub fn with_metadata(self, key: &str, value: &str) -> Self
Set metadata
Sourcepub fn mark_loaded(&mut self)
pub fn mark_loaded(&mut self)
Mark as loaded
Sourcepub fn mark_reloaded(&mut self)
pub fn mark_reloaded(&mut self)
Mark as reloaded
Sourcepub fn check_dependencies(&self, available: &[String]) -> Vec<String>
pub fn check_dependencies(&self, available: &[String]) -> Vec<String>
Check if dependencies are satisfied
Sourcepub fn has_capability(&self, cap: &str) -> bool
pub fn has_capability(&self, cap: &str) -> bool
Check if has capability
Trait Implementations§
Source§impl Clone for PluginInfo
impl Clone for PluginInfo
Source§fn clone(&self) -> PluginInfo
fn clone(&self) -> PluginInfo
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 PluginInfo
impl Debug for PluginInfo
Source§impl<'de> Deserialize<'de> for PluginInfo
impl<'de> Deserialize<'de> for PluginInfo
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 PluginInfo
impl RefUnwindSafe for PluginInfo
impl Send for PluginInfo
impl Sync for PluginInfo
impl Unpin for PluginInfo
impl UnsafeUnpin for PluginInfo
impl UnwindSafe for PluginInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more