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
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files
// DO NOT EDIT

use crate::RepoFinder;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
use glib::object::IsA;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
use glib::object::ObjectType as ObjectType_;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
use glib::translate::*;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
use glib::StaticType;
use std::fmt;

glib::wrapper! {
    #[doc(alias = "OstreeRepoFinderMount")]
    pub struct RepoFinderMount(Object<ffi::OstreeRepoFinderMount, ffi::OstreeRepoFinderMountClass>) @implements RepoFinder;

    match fn {
        type_ => || ffi::ostree_repo_finder_mount_get_type(),
    }
}

impl RepoFinderMount {
    #[cfg(any(feature = "v2018_6", feature = "dox"))]
    #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
    #[doc(alias = "ostree_repo_finder_mount_new")]
    pub fn new(monitor: Option<&impl IsA<gio::VolumeMonitor>>) -> RepoFinderMount {
        unsafe {
            from_glib_full(ffi::ostree_repo_finder_mount_new(monitor.map(|p| p.as_ref()).to_glib_none().0))
        }
    }

    #[cfg(any(feature = "v2018_6", feature = "dox"))]
    #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
    pub fn monitor(&self) -> Option<gio::VolumeMonitor> {
        glib::ObjectExt::property(self, "monitor")
    }
}

impl fmt::Display for RepoFinderMount {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        f.write_str("RepoFinderMount")
    }
}