Skip to content

Commit

Permalink
feat: Add factory function to plugin struct
Browse files Browse the repository at this point in the history
  • Loading branch information
DashieTM committed Mar 17, 2024
1 parent 7545ea2 commit c000429
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "re_set-lib"
version = "2.3.0"
version = "2.4.0"
edition = "2021"
description = "Data structure library for ReSet"
repository = "https://github.com/Xetibo/ReSet-Lib"
Expand Down
13 changes: 13 additions & 0 deletions src/utils/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,16 @@ pub struct Plugin {
pub data: PluginData,
}

impl Plugin {
pub fn new(
path: Path<'static>,
interfaces: Vec<dbus_crossroads::IfaceToken<PluginData>>,
data: PluginData,
) -> Self {
Self {
path,
interfaces,
data,
}
}
}

0 comments on commit c000429

Please sign in to comment.