58 lines
2.0 KiB
Rust
58 lines
2.0 KiB
Rust
// 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)
|
|
}
|
|
}
|