pub struct ExtensionInfo {
pub name: String,
pub version: String,
pub author: String,
pub description: String,
pub capabilities: Vec<ExtensionCapability>,
pub dependencies: Vec<String>,
pub homepage: Option<String>,
pub license: Option<String>,
}Expand description
Extension metadata and information
Fields§
§name: StringExtension name
version: StringExtension version
Extension author
description: StringExtension description
capabilities: Vec<ExtensionCapability>Capabilities provided by this extension
dependencies: Vec<String>Dependencies on other extensions
homepage: Option<String>Optional extension website/homepage
license: Option<String>License identifier
Implementations§
Source§impl ExtensionInfo
impl ExtensionInfo
Sourcepub fn new(
name: String,
version: String,
author: String,
description: String,
) -> Self
pub fn new( name: String, version: String, author: String, description: String, ) -> Self
Create a new extension info
Sourcepub fn with_capability(self, capability: ExtensionCapability) -> Self
pub fn with_capability(self, capability: ExtensionCapability) -> Self
Add a capability to this extension
Sourcepub fn with_capabilities(self, capabilities: Vec<ExtensionCapability>) -> Self
pub fn with_capabilities(self, capabilities: Vec<ExtensionCapability>) -> Self
Add multiple capabilities
Sourcepub fn with_dependency(self, dependency: String) -> Self
pub fn with_dependency(self, dependency: String) -> Self
Add a dependency on another extension
Sourcepub fn with_homepage(self, homepage: String) -> Self
pub fn with_homepage(self, homepage: String) -> Self
Set the homepage URL
Sourcepub fn with_license(self, license: String) -> Self
pub fn with_license(self, license: String) -> Self
Set the license
Sourcepub fn has_capability(&self, capability: &ExtensionCapability) -> bool
pub fn has_capability(&self, capability: &ExtensionCapability) -> bool
Check if this extension provides a specific capability
Trait Implementations§
Source§impl Clone for ExtensionInfo
impl Clone for ExtensionInfo
Source§fn clone(&self) -> ExtensionInfo
fn clone(&self) -> ExtensionInfo
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 ExtensionInfo
impl Debug for ExtensionInfo
Source§impl PartialEq for ExtensionInfo
impl PartialEq for ExtensionInfo
impl Eq for ExtensionInfo
impl StructuralPartialEq for ExtensionInfo
Auto Trait Implementations§
impl Freeze for ExtensionInfo
impl RefUnwindSafe for ExtensionInfo
impl Send for ExtensionInfo
impl Sync for ExtensionInfo
impl Unpin for ExtensionInfo
impl UnwindSafe for ExtensionInfo
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