diff options
Diffstat (limited to 'rust-bindings/src/auto/sysroot.rs')
-rw-r--r-- | rust-bindings/src/auto/sysroot.rs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/rust-bindings/src/auto/sysroot.rs b/rust-bindings/src/auto/sysroot.rs index abb80387..020a8a1b 100644 --- a/rust-bindings/src/auto/sysroot.rs +++ b/rust-bindings/src/auto/sysroot.rs @@ -185,7 +185,7 @@ impl Sysroot { #[doc(alias = "ostree_sysroot_get_deployment_directory")] #[doc(alias = "get_deployment_directory")] - pub fn deployment_directory(&self, deployment: &Deployment) -> Option<gio::File> { + pub fn deployment_directory(&self, deployment: &Deployment) -> gio::File { unsafe { from_glib_full(ffi::ostree_sysroot_get_deployment_directory(self.to_glib_none().0, deployment.to_glib_none().0)) } @@ -193,7 +193,7 @@ impl Sysroot { #[doc(alias = "ostree_sysroot_get_deployment_dirpath")] #[doc(alias = "get_deployment_dirpath")] - pub fn deployment_dirpath(&self, deployment: &Deployment) -> Option<glib::GString> { + pub fn deployment_dirpath(&self, deployment: &Deployment) -> glib::GString { unsafe { from_glib_full(ffi::ostree_sysroot_get_deployment_dirpath(self.to_glib_none().0, deployment.to_glib_none().0)) } @@ -225,7 +225,7 @@ impl Sysroot { #[doc(alias = "ostree_sysroot_get_path")] #[doc(alias = "get_path")] - pub fn path(&self) -> Option<gio::File> { + pub fn path(&self) -> gio::File { unsafe { from_glib_none(ffi::ostree_sysroot_get_path(self.to_glib_none().0)) } @@ -369,7 +369,7 @@ impl Sysroot { } #[doc(alias = "ostree_sysroot_origin_new_from_refspec")] - pub fn origin_new_from_refspec(&self, refspec: &str) -> Option<glib::KeyFile> { + pub fn origin_new_from_refspec(&self, refspec: &str) -> glib::KeyFile { unsafe { from_glib_full(ffi::ostree_sysroot_origin_new_from_refspec(self.to_glib_none().0, refspec.to_glib_none().0)) } @@ -400,7 +400,7 @@ impl Sysroot { #[cfg(any(feature = "v2017_7", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))] #[doc(alias = "ostree_sysroot_repo")] - pub fn repo(&self) -> Option<Repo> { + pub fn repo(&self) -> Repo { unsafe { from_glib_none(ffi::ostree_sysroot_repo(self.to_glib_none().0)) } @@ -534,7 +534,7 @@ impl Sysroot { #[doc(alias = "ostree_sysroot_get_deployment_origin_path")] #[doc(alias = "get_deployment_origin_path")] - pub fn deployment_origin_path(deployment_path: &impl IsA<gio::File>) -> Option<gio::File> { + pub fn deployment_origin_path(deployment_path: &impl IsA<gio::File>) -> gio::File { unsafe { from_glib_full(ffi::ostree_sysroot_get_deployment_origin_path(deployment_path.as_ref().to_glib_none().0)) } @@ -543,8 +543,8 @@ impl Sysroot { #[cfg(any(feature = "v2017_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))] #[doc(alias = "journal-msg")] - pub fn connect_journal_msg<F: Fn(&Self, &str) + 'static>(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn journal_msg_trampoline<F: Fn(&Sysroot, &str) + 'static>(this: *mut ffi::OstreeSysroot, msg: *mut libc::c_char, f: glib::ffi::gpointer) { + pub fn connect_journal_msg<F: Fn(&Self, &str) + Send + 'static>(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn journal_msg_trampoline<F: Fn(&Sysroot, &str) + Send + 'static>(this: *mut ffi::OstreeSysroot, msg: *mut libc::c_char, f: glib::ffi::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &glib::GString::from_glib_borrow(msg)) } @@ -556,6 +556,8 @@ impl Sysroot { } } +unsafe impl Send for Sysroot {} + impl fmt::Display for Sysroot { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Sysroot") |