Type Alias dart_sys::Dart_DeferredLoadHandler
source · pub type Dart_DeferredLoadHandler = Option<unsafe extern "C" fn(loading_unit_id: isize) -> Dart_Handle>;
Expand description
Handles deferred loading requests. When this handler is invoked, it should eventually load the deferred loading unit with the given id and call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is recommended that the loading occur asynchronously, but it is permitted to call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the handler returns.
If an error is returned, it will be propagated through
prefix.loadLibrary()
. This is useful for synchronous
implementations, which must propagate any unwind errors from
Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler
should return a non-error such as Dart_Null()
.
Aliased Type§
enum Dart_DeferredLoadHandler {
None,
Some(unsafe extern "C" fn(_: isize) -> *mut _Dart_Handle),
}