gio/auto/simple_io_stream.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{IOStream, InputStream, OutputStream, ffi};
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9 #[doc(alias = "GSimpleIOStream")]
10 pub struct SimpleIOStream(Object<ffi::GSimpleIOStream>) @extends IOStream;
11
12 match fn {
13 type_ => || ffi::g_simple_io_stream_get_type(),
14 }
15}
16
17impl SimpleIOStream {
18 #[doc(alias = "g_simple_io_stream_new")]
19 pub fn new(
20 input_stream: &impl IsA<InputStream>,
21 output_stream: &impl IsA<OutputStream>,
22 ) -> SimpleIOStream {
23 unsafe {
24 IOStream::from_glib_full(ffi::g_simple_io_stream_new(
25 input_stream.as_ref().to_glib_none().0,
26 output_stream.as_ref().to_glib_none().0,
27 ))
28 .unsafe_cast()
29 }
30 }
31}