match<R> abstract method
R
match<R>({
- required R ok(
- T value
- required R err(
- E error
Pattern matches this result.
final label = const Ok<int, String>(42).match(
ok: (value) => 'count=$value',
err: (error) => error,
);
Implementation
R match<R>({
required R Function(T value) ok,
required R Function(E error) err,
});