Skip to content

Commit

Permalink
feat: Add factory function for plugindata
Browse files Browse the repository at this point in the history
  • Loading branch information
DashieTM committed Mar 17, 2024
1 parent cc87f82 commit b719cb1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/utils/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ impl PluginCapabilities {
pub fn get_capabilities(&self) -> Vec<String> {
self.0.clone()
}

pub fn new(capabilities: Vec<String>) -> Self {
Self(capabilities)
}
}

#[repr(C)]
Expand All @@ -24,6 +28,10 @@ impl PluginData {
pub fn get_data(&self) -> HashMap<String, Variant> {
self.0.clone()
}

pub fn new(map: HashMap<String, Variant>) -> Self {
Self(map)
}
}

#[repr(C)]
Expand Down

0 comments on commit b719cb1

Please sign in to comment.