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

#[cfg(any(feature = "v2018_6", feature = "dox"))]
use glib::translate::*;
use gobject_sys;
use ostree_sys;
use std::cmp;

glib_wrapper! {
    #[derive(Debug, Hash)]
    pub struct RepoFinderResult(Boxed<ostree_sys::OstreeRepoFinderResult>);

    match fn {
        copy => |ptr| gobject_sys::g_boxed_copy(ostree_sys::ostree_repo_finder_result_get_type(), ptr as *mut _) as *mut ostree_sys::OstreeRepoFinderResult,
        free => |ptr| gobject_sys::g_boxed_free(ostree_sys::ostree_repo_finder_result_get_type(), ptr as *mut _),
        get_type => || ostree_sys::ostree_repo_finder_result_get_type(),
    }
}

impl RepoFinderResult {
    //#[cfg(any(feature = "v2018_6", feature = "dox"))]
    //pub fn new<P: IsA<RepoFinder>>(remote: &Remote, finder: &P, priority: i32, ref_to_checksum: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 1, id: 0 }/TypeId { ns_id: 0, id: 28 }, ref_to_timestamp: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 1, id: 0 }/TypeId { ns_id: 0, id: 9 }, summary_last_modified: u64) -> RepoFinderResult {
    //    unsafe { TODO: call ostree_sys:ostree_repo_finder_result_new() }
    //}

    #[cfg(any(feature = "v2018_6", feature = "dox"))]
    fn compare(&self, b: &RepoFinderResult) -> i32 {
        unsafe {
            ostree_sys::ostree_repo_finder_result_compare(self.to_glib_none().0, b.to_glib_none().0)
        }
    }
}

impl PartialEq for RepoFinderResult {
    #[inline]
    fn eq(&self, other: &Self) -> bool {
        self.compare(other) == 0
    }
}

impl Eq for RepoFinderResult {}

impl PartialOrd for RepoFinderResult {
    #[inline]
    fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
        self.compare(other).partial_cmp(&0)
    }
}

impl Ord for RepoFinderResult {
    #[inline]
    fn cmp(&self, other: &Self) -> cmp::Ordering {
        self.compare(other).cmp(&0)
    }
}