gio/auto/
simple_io_stream.rs1use crate::{ffi, IOStream, InputStream, OutputStream};
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}