1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Flutter counterpart: `foundation/basic_types.dart` (the callback signatures).
use Rc;
use crateApp;
use crateTask;
/// Signature of callbacks that have no arguments and return no data.
///
/// Dart's `VoidCallback`, from `dart:ui`. Receives [`App`] because a Rust callback cannot
/// capture what it mutates.
pub type VoidCallback = ;
/// Signature for callbacks that report that an underlying value has changed.
///
/// Flutter's `ValueChanged<T>` is `void Function(T value)`. Receives [`App`]
/// because a Rust callback cannot capture what it mutates.
pub type ValueChanged<T> = ;
/// Signature for callbacks that report that a value has been set.
///
/// This is the same signature as [`ValueChanged`], but is used when the
/// callback is called even if the underlying value has not changed.
pub type ValueSetter<T> = ;
/// Signature for callbacks that are to report a value on demand.
pub type ValueGetter<T> = ;
/// Signature of callbacks that have no arguments and return no data, but that return a
/// `Future` to indicate when their work is complete.
///
/// The callback runs its body up to the first `await` before returning and hands back the
/// continuation as a [`Task`]; a body with nothing to await returns [`Task::ready`].
pub type AsyncCallback = ;
/// Signature for callbacks that report that a value has been set and return a `Future` that
/// completes when the value has been saved.
pub type AsyncValueSetter<T> = ;
/// Signature for callbacks that are to asynchronously report a value on demand.
pub type AsyncValueGetter<T> = ;