From 3535b58f7ac2fb2910cb32e9d653cc80f8a5bd64 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 9 Nov 2023 14:53:53 -0500 Subject: [PATCH] rust: Add a `stateroot()` alias in the Rust bindings Easy to do here, super annoying in C. --- rust-bindings/src/deployment.rs | 10 ++++++++++ rust-bindings/src/lib.rs | 1 + 2 files changed, 11 insertions(+) create mode 100644 rust-bindings/src/deployment.rs diff --git a/rust-bindings/src/deployment.rs b/rust-bindings/src/deployment.rs new file mode 100644 index 0000000000..d408ce0d10 --- /dev/null +++ b/rust-bindings/src/deployment.rs @@ -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() + } +} diff --git a/rust-bindings/src/lib.rs b/rust-bindings/src/lib.rs index 69a72cdc4a..71e33f157e 100644 --- a/rust-bindings/src/lib.rs +++ b/rust-bindings/src/lib.rs @@ -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"))]