Trait gio::prelude::OutputStreamExt
source · [−]pub trait OutputStreamExt: 'static {
Show 18 methods
fn clear_pending(&self);
fn close(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>;
fn close_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn close_future(
&self,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>;
fn flush(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>;
fn flush_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn flush_future(
&self,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>;
fn has_pending(&self) -> bool;
fn is_closed(&self) -> bool;
fn is_closing(&self) -> bool;
fn set_pending(&self) -> Result<(), Error>;
fn splice(
&self,
source: &impl IsA<InputStream>,
flags: OutputStreamSpliceFlags,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<isize, Error>;
fn splice_async<P: FnOnce(Result<isize, Error>) + 'static>(
&self,
source: &impl IsA<InputStream>,
flags: OutputStreamSpliceFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn splice_future(
&self,
source: &impl IsA<InputStream> + Clone + 'static,
flags: OutputStreamSpliceFlags,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<isize, Error>> + 'static>>;
fn write(
&self,
buffer: &[u8],
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<isize, Error>;
fn write_bytes(
&self,
bytes: &Bytes,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<isize, Error>;
fn write_bytes_async<P: FnOnce(Result<isize, Error>) + 'static>(
&self,
bytes: &Bytes,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn write_bytes_future(
&self,
bytes: &Bytes,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<isize, Error>> + 'static>>;
}
Required Methods
source
fn clear_pending(&self)
sourcefn close_async<P: FnOnce(Result<(), Error>) + 'static>(
fn close_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
sourcefn close_future(
fn close_future(
&self,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
sourcefn flush_async<P: FnOnce(Result<(), Error>) + 'static>(
fn flush_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
sourcefn flush_future(
fn flush_future(
&self,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
source
fn has_pending(&self) -> bool
source
fn is_closing(&self) -> bool
source
fn set_pending(&self) -> Result<(), Error>
sourcefn splice(
fn splice(
&self,
source: &impl IsA<InputStream>,
flags: OutputStreamSpliceFlags,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<isize, Error>
sourcefn splice_async<P: FnOnce(Result<isize, Error>) + 'static>(
fn splice_async<P: FnOnce(Result<isize, Error>) + 'static>(
&self,
source: &impl IsA<InputStream>,
flags: OutputStreamSpliceFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
sourcefn splice_future(
fn splice_future(
&self,
source: &impl IsA<InputStream> + Clone + 'static,
flags: OutputStreamSpliceFlags,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<isize, Error>> + 'static>>
sourcefn write(
fn write(
&self,
buffer: &[u8],
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<isize, Error>
sourcefn write_bytes(