Left<T> class final

Неудачная ветка Result; создаётся через Left(failure) или Result.failure(failure).

Inheritance
Available extensions

Constructors

Left(Failure failure)
const

Properties

dataOrNull → T?
Значение при успехе, иначе null.
no setterinherited
failure → Failure
Ошибка неудачи.
final
failureOrNull → Failure?
Ошибка при неудаче, иначе null.
no setterinherited
hashCode → int
The hash code for this object.
no setteroverride
isFailure → bool
true, если результат — ошибка (Left).
no setterinherited
isSuccess → bool
true, если результат — успех (Right).
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dataOrThrow() → T

Available on Result<T>, provided by the ResultTestExpectationsX extension

Значение успеха; иначе StateError с кодом и сообщением ошибки.
failureOrThrow() → Failure

Available on Result<T>, provided by the ResultTestExpectationsX extension

Ошибка неудачи; иначе StateError со значением успеха.
flatMap<R>(Result<R> f(T value)) → Result<R>
Chaining: если success — применяет f, если failure — пропускает.
inherited
fold<R>({required R onFailure(Failure failure), required R onSuccess(T value)}) → R
Разворачивает результат в одно значение.
inherited
getOrElse(T orElse(Failure failure)) → T
Значение при успехе, иначе результат orElse над ошибкой.
inherited
map<R>(R mapper(T value)) → Result<R>
Преобразует значение при успехе; ошибка проходит насквозь без изменений.
inherited
mapFailure(Failure mapper(Failure failure)) → Result<T>
Трансформирует только Failure.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orElse(T defaultValue(Failure failure)) → T
Значение при успехе, иначе defaultValue.
inherited
tap({void onSuccess(T value)?, void onFailure(Failure failure)?}) → Result<T>
Side-effect без трансформации. Возвращает исходный Result.
inherited
toString() → String
A string representation of this object.
inherited
when<R>({required R success(T value), required R onFailure(Failure failure)}) → R
Паттерн-матчинг без fold.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override