pub struct Plugin {
pub authors: Option<Vec<String>>,
pub name: String,
pub version: String,
pub description: Option<String>,
pub license: Option<String>,
pub path: String,
}Fields§
§name: String§version: String§description: Option<String>§license: Option<String>§path: StringImplementations§
Source§impl Plugin
impl Plugin
Sourcepub fn register(&self, f: impl Fn(Plugin))
pub fn register(&self, f: impl Fn(Plugin))
Registers the plugin, adding it to the appropriate directory Because application architecture may vary, you may want to implement your own logic for registering plugins.
Sourcepub fn unregister(&self, f: impl Fn(Plugin))
pub fn unregister(&self, f: impl Fn(Plugin))
Unregisters the plugin, removing it from the directory Because application architecture may vary, you may want to implement your own logic for unregistering plugins.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Plugin
impl<'de> Deserialize<'de> for Plugin
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 Plugin
impl RefUnwindSafe for Plugin
impl Send for Plugin
impl Sync for Plugin
impl Unpin for Plugin
impl UnwindSafe for Plugin
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