Exit<A, E> class sealed

Represents the result of executing an Effect.

An Exit can either be a Success with a value or a Failure with a cause.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
isFailure bool
Returns true if this is a Failure
no setter
isSuccess bool
Returns true if this is a Success
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

flatMap<B, E2>(Exit<B, E2> f(A)) Exit<B, E2>
Flat maps this exit with a function that returns another exit
fold<C>(C onFailure(Cause<E>), C onSuccess(A)) → C
Folds this exit into a single value
map<B>(B f(A)) Exit<B, E>
Maps the success value of this exit
mapError<E2>(E2 f(E)) Exit<A, E2>
Maps the error type of this exit
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

die(Object throwable, [StackTrace? stackTrace]) Exit<Never, Never>
Creates a failed exit that died with the given throwable
fail<E>(E error) Exit<Never, E>
Creates a failed exit with the given error
failCause<E>(Cause<E> cause) Exit<Never, E>
Creates a failed exit with the given cause
succeed<A>(A value) Exit<A, Never>
Creates a successful exit with the given value