[−][src]Trait gio::prelude::PollableOutputStreamExtManual
Required methods
fn create_source<F, C>(
&self,
cancellable: Option<&C>,
name: Option<&str>,
priority: Priority,
func: F
) -> Source where
F: FnMut(&Self) -> Continue + 'static,
C: IsA<Cancellable>,
&self,
cancellable: Option<&C>,
name: Option<&str>,
priority: Priority,
func: F
) -> Source where
F: FnMut(&Self) -> Continue + 'static,
C: IsA<Cancellable>,
Creates a glib::Source
that triggers when self
can be written, or
cancellable
is triggered or an error occurs. The callback on the
source is of the GPollableSourceFunc
type.
As with PollableOutputStream::is_writable
, it is possible that
the stream may not actually be writable even after the source
triggers, so you should use PollableOutputStream::write_nonblocking
rather than OutputStreamExt::write
from the callback.
cancellable
a Cancellable
, or None
Returns
a new glib::Source
fn create_source_future<C: IsA<Cancellable>>(
&self,
cancellable: Option<&C>,
priority: Priority
) -> Pin<Box<dyn Future<Output = ()> + 'static>>
&self,
cancellable: Option<&C>,
priority: Priority
) -> Pin<Box<dyn Future<Output = ()> + 'static>>
fn create_source_stream<C: IsA<Cancellable>>(
&self,
cancellable: Option<&C>,
priority: Priority
) -> Pin<Box<dyn Stream<Item = ()> + 'static>>
&self,
cancellable: Option<&C>,
priority: Priority
) -> Pin<Box<dyn Stream<Item = ()> + 'static>>
Provided methods
fn into_async_write(self) -> Result<OutputStreamAsyncWrite<Self>, Self> where
Self: IsA<PollableOutputStream>,
Self: IsA<PollableOutputStream>,
Implementors
impl<O: IsA<PollableOutputStream>> PollableOutputStreamExtManual for O
[src]
fn create_source<F, C>(
&self,
cancellable: Option<&C>,
name: Option<&str>,
priority: Priority,
func: F
) -> Source where
F: FnMut(&Self) -> Continue + 'static,
C: IsA<Cancellable>,
[src]
&self,
cancellable: Option<&C>,
name: Option<&str>,
priority: Priority,
func: F
) -> Source where
F: FnMut(&Self) -> Continue + 'static,
C: IsA<Cancellable>,
fn create_source_future<C: IsA<Cancellable>>(
&self,
cancellable: Option<&C>,
priority: Priority
) -> Pin<Box<dyn Future<Output = ()> + 'static>>
[src]
&self,
cancellable: Option<&C>,
priority: Priority
) -> Pin<Box<dyn Future<Output = ()> + 'static>>
fn create_source_stream<C: IsA<Cancellable>>(
&self,
cancellable: Option<&C>,
priority: Priority
) -> Pin<Box<dyn Stream<Item = ()> + 'static>>
[src]
&self,
cancellable: Option<&C>,
priority: Priority
) -> Pin<Box<dyn Stream<Item = ()> + 'static>>