pub struct Config {
pub name: String,
pub description: String,
pub author: String,
pub license: Option<String>,
pub depends: Option<HashMap<String, VersionReq>>,
pub optional_depends: Option<HashMap<String, VersionReq>>,
}Expand description
Plugin configuration loaded from a config.toml file.
This struct represents the configuration for a Lua plugin, including metadata like name, description, and version, as well as dependency information.
Fields§
§name: StringThe name of the plugin.
This should be a unique identifier for the plugin, using only alphanumeric characters and underscores.
description: StringA brief description of what the plugin does.
The author of the plugin.
license: Option<String>An optional SPDX license identifier.
depends: Option<HashMap<String, VersionReq>>Required dependencies for this plugin.
Maps plugin names to version requirements using semantic versioning.
Example: other_plugin = "^1.0.0"
optional_depends: Option<HashMap<String, VersionReq>>Optional dependencies for this plugin.
These dependencies are not required for the plugin to function, but may enable additional features if available.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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> 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