Result<T extends Object?, E extends Object?> class sealed

A Rust-like Result type

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
isErr bool
no setter
isOk bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

andThen<U>(Result<U, E> f(T value)) Result<U, E>
err() → E?
fold<R extends Object?>({R onOk(T value)?, R onErr(E error)?}) → R
foldOne<R extends Object?>(R f(T? value, E? error)) → R
map<U>(U f(T value)) Result<U, E>
mapErr<F>(F f(E error)) Result<T, F>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ok() → T?
toString() String
A string representation of this object.
inherited
unwrap() → T
unwrapErr() → E
unwrapOr(T defaultValue) → T

Operators

operator ==(Object other) bool
The equality operator.
inherited