Result<T, E extends Exception> class sealed

Implementers

Properties

err → E?
no setter
hashCode int
The hash code for this object.
no setterinherited
isErr bool
no setter
isOk bool
no setter
ok → T?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

and<U>(Result<U, E> result) Result<U, E>
andThen<U>(Result<U, E> toResult(T)) Result<U, E>
copy() Result<T, E>
expect(String message) → T
expectErr(String message) → E
inspect(void onOk(T)) Result<T, E>
inspectErr(void onErr(E)) Result<T, E>
map<U>(U toValue(T)) Result<U, E>
mapErr<F extends Exception>(F toErr(E)) Result<T, F>
mapOr<U>(U defaultValue, U toValue(T)) → U
mapOrElse<U>(U onErr(E), U toValue(T)) → U
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
or<F extends Exception>(Result<T, F> result) Result<T, F>
orElse<F extends Exception>(Result<T, F> toResult(E)) Result<T, F>
toString() String
A string representation of this object.
inherited
unwrap() → T
unwrapErr() → E
unwrapOr(T defaultValue) → T
unwrapOrElse(T onErr(E)) → T

Operators

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