rust: Add a `stateroot()` alias in the Rust bindings
authorColin Walters <walters@verbum.org>
Thu, 9 Nov 2023 19:53:53 +0000 (14:53 -0500)
committerColin Walters <walters@verbum.org>
Thu, 9 Nov 2023 20:02:27 +0000 (15:02 -0500)
Easy to do here, super annoying in C.

rust-bindings/src/deployment.rs [new file with mode: 0644]
rust-bindings/src/lib.rs

diff --git a/rust-bindings/src/deployment.rs b/rust-bindings/src/deployment.rs
new file mode 100644 (file)
index 0000000..d408ce0
--- /dev/null
@@ -0,0 +1,10 @@
+use glib::GString;
+
+use crate::Deployment;
+
+impl Deployment {
+    /// Access the name of the deployment stateroot.
+    pub fn stateroot(&self) -> GString {
+        self.osname()
+    }
+}
index 69a72cdc4a05a4b76c7542f9704ef8182d8b4002..71e33f157e0126cab815ab95426ee59f5f562ee6 100644 (file)
@@ -56,6 +56,7 @@ mod object_name;
 pub use crate::object_name::*;
 mod object_details;
 pub use crate::object_details::*;
+mod deployment;
 mod repo;
 pub use crate::repo::*;
 #[cfg(any(feature = "v2016_8", feature = "dox"))]