result_in_dart library

Dart implementation of Rust's Result type.

Result<T, E> is the type used for returning and propagating errors. It is a class with the two variants, Ok(T) and Err(E). where T is the type of a successful value and E is the type of an error.

Loosely based on https://doc.rust-lang.org/src/core/result.rs.html source code.

Classes

Default
Default result class.
Err<T, E>
Err is a type that represents failure and contains a E type error value.
Ok<T, E>
Ok is a type that represents success and contains a T type success value.
Result<T, E>
Result is a type that represents either success Ok or failure Err.

Extensions

FlattenResult on Result<Result<T, E>, E>

Exceptions / Errors

ResultUnwrapError
Error thrown by the runtime system when unwrap fails.