forked from ostreedev/ostree
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,034 additions
and
640 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// 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 | ||
|
||
use gio; | ||
use glib; | ||
use glib::object::IsA; | ||
use glib::translate::*; | ||
use glib::GString; | ||
use ostree_sys; | ||
use std::fmt; | ||
use std::ptr; | ||
|
||
glib_wrapper! { | ||
pub struct ContentWriter(Object<ostree_sys::OstreeContentWriter, ostree_sys::OstreeContentWriterClass, ContentWriterClass>) @extends gio::OutputStream; | ||
|
||
match fn { | ||
get_type => || ostree_sys::ostree_content_writer_get_type(), | ||
} | ||
} | ||
|
||
pub const NONE_CONTENT_WRITER: Option<&ContentWriter> = None; | ||
|
||
pub trait ContentWriterExt: 'static { | ||
fn finish<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<GString, glib::Error>; | ||
} | ||
|
||
impl<O: IsA<ContentWriter>> ContentWriterExt for O { | ||
fn finish<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<GString, glib::Error> { | ||
unsafe { | ||
let mut error = ptr::null_mut(); | ||
let ret = ostree_sys::ostree_content_writer_finish(self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error); | ||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } | ||
} | ||
} | ||
} | ||
|
||
impl fmt::Display for ContentWriter { | ||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
write!(f, "ContentWriter") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab) | ||
from gir-files (https://github.com/gtk-rs/gir-files @ 9fe8b26) | ||
from gir-files (https://github.com/gtk-rs/gir-files @ e4bcf9b+) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab) | ||
from gir-files (https://github.com/gtk-rs/gir-files @ 9fe8b26) | ||
from gir-files (https://github.com/gtk-rs/gir-files @ e4bcf9b+) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters