Trait gio::prelude::AsyncResultExt

source ·
pub trait AsyncResultExt: IsA<AsyncResult> + Sealed + 'static {
    // Provided methods
    fn source_object(&self) -> Option<Object> { ... }
    fn legacy_propagate_error(&self) -> Result<(), Error> { ... }
Expand description

Trait containing all AsyncResult methods.


AsyncResult, Task

Provided Methods§


fn source_object(&self) -> Option<Object>

Gets the source object from a #GAsyncResult.


a new reference to the source object for the @self, or None if there is none.


fn legacy_propagate_error(&self) -> Result<(), Error>

If @self is a #GSimpleAsyncResult, this is equivalent to g_simple_async_result_propagate_error(). Otherwise it returns false.

This can be used for legacy error handling in async *_finish() wrapper functions that traditionally handled #GSimpleAsyncResult error returns themselves rather than calling into the virtual method. This should not be used in new code; #GAsyncResult errors that are set by virtual methods should also be extracted by virtual methods, to enable subclasses to chain up correctly.


true if @error is has been filled in with an error from @self, false if not.

Object Safety§

This trait is not object safe.