Spec-Zone.ru › Dart 2

dart:async

RegisterUnaryCallbackHandler typedef

RegisterUnaryCallbackHandler = ZoneUnaryCallback<R, T> Function<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg))

The type of a custom Zone.registerUnaryCallback implementation function.

Receives the Zone that the handler was registered on as self, a delegate forwarding to the handlers of self's parent zone as parent, and the current zone where the error was uncaught as zone, which will have self as a parent zone.

The function f is the function which was passed to the which was passed to the Zone.registerUnaryCallback of zone.

The handler should return either the function f or another function replacing f, typically by wrapping f in a function which does something extra before and after invoking f

The function must only access zone-related functionality through self, parent or zone. It should not depend on the current zone (Zone.current).

Implementation

typedef RegisterUnaryCallbackHandler = ZoneUnaryCallback<R, T> Function<R, T>(
    Zone self, ZoneDelegate parent, Zone zone, R Function(T arg) f);

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-async/RegisterUnaryCallbackHandler.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API