From: Colin Walters Date: Thu, 9 Nov 2023 19:53:53 +0000 (-0500) Subject: rust: Add a `stateroot()` alias in the Rust bindings X-Git-Tag: archive/raspbian/2023.8-1+rpi1^2~9^2^2~16^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3535b58f7ac2fb2910cb32e9d653cc80f8a5bd64;p=ostree.git rust: Add a `stateroot()` alias in the Rust bindings Easy to do here, super annoying in C. --- diff --git a/rust-bindings/src/deployment.rs b/rust-bindings/src/deployment.rs new file mode 100644 index 00000000..d408ce0d --- /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 69a72cdc..71e33f15 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"))]