1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#[cfg(any(feature = "v2018_6", feature = "dox"))]
use gio;
use glib::object::IsA;
use glib::translate::*;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
use glib::StaticType;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
use glib::Value;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
use gobject_sys;
use ostree_sys;
use std::fmt;
use RepoFinder;
glib_wrapper! {
pub struct RepoFinderMount(Object<ostree_sys::OstreeRepoFinderMount, ostree_sys::OstreeRepoFinderMountClass, RepoFinderMountClass>) @implements RepoFinder;
match fn {
get_type => || ostree_sys::ostree_repo_finder_mount_get_type(),
}
}
impl RepoFinderMount {
#[cfg(any(feature = "v2018_6", feature = "dox"))]
pub fn new<P: IsA<gio::VolumeMonitor>>(monitor: Option<&P>) -> RepoFinderMount {
unsafe {
from_glib_full(ostree_sys::ostree_repo_finder_mount_new(monitor.map(|p| p.as_ref()).to_glib_none().0))
}
}
}
pub const NONE_REPO_FINDER_MOUNT: Option<&RepoFinderMount> = None;
pub trait RepoFinderMountExt: 'static {
#[cfg(any(feature = "v2018_6", feature = "dox"))]
fn get_property_monitor(&self) -> Option<gio::VolumeMonitor>;
}
impl<O: IsA<RepoFinderMount>> RepoFinderMountExt for O {
#[cfg(any(feature = "v2018_6", feature = "dox"))]
fn get_property_monitor(&self) -> Option<gio::VolumeMonitor> {
unsafe {
let mut value = Value::from_type(<gio::VolumeMonitor as StaticType>::static_type());
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"monitor\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().expect("Return Value for property `monitor` getter")
}
}
}
impl fmt::Display for RepoFinderMount {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "RepoFinderMount")
}
}