pub trait AsyncResultExt:
IsA<AsyncResult>
+ Sealed
+ 'static {
// Provided methods
fn source_object(&self) -> Option<Object> { ... }
fn legacy_propagate_error(&self) -> Result<(), Error> { ... }
}
Expand description
Provided Methods§
Sourcefn source_object(&self) -> Option<Object>
fn source_object(&self) -> Option<Object>
Gets the source object from a AsyncResult
.
§Returns
a new reference to the source
object for the @self, or NULL
if there is none.
Sourcefn legacy_propagate_error(&self) -> Result<(), Error>
fn legacy_propagate_error(&self) -> Result<(), Error>
If @self is a Gio::SimpleAsyncResult
, this is equivalent to
Gio::SimpleAsyncResult::propagate_error()
. Otherwise it returns
FALSE
.
This can be used for legacy error handling in async *_finish()
wrapper functions that traditionally handled Gio::SimpleAsyncResult
error returns themselves rather than calling into the virtual method.
This should not be used in new code; AsyncResult
errors that are
set by virtual methods should also be extracted by virtual methods,
to enable subclasses to chain up correctly.
§Returns
TRUE
if @error is has been filled in with an error from
@self, FALSE
if not.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.