Partial<E, A> class final

Parse succeeded but accumulated errors (resilient parsing).

Inheritance
Available extensions

Constructors

Partial(A value, List<E> errorThunk(), int consumed)
Creates a partial result with lazy errors.
Partial.eager(A value, List<E> errors, int consumed)
Creates a partial result with pre-computed errors.

Properties

consumed int
Number of input characters consumed.
final
errors List<E>
Materialized errors (evaluated once from errorThunk).
no setter
errors List<E>

Available on Result<E, A>, provided by the ResultOps extension

Errors from any case. Empty for Success.
no setter
errorThunk List<E> Function()
Lazy error thunk, evaluated on first access of errors.
final
hashCode int
The hash code for this object.
no setterinherited
isFailure bool

Available on Result<E, A>, provided by the ResultOps extension

True if this is a Failure.
no setter
isPartial bool

Available on Result<E, A>, provided by the ResultOps extension

True if this is a Partial.
no setter
isSuccess bool

Available on Result<E, A>, provided by the ResultOps extension

True if this is a Success.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → A
The parsed value.
final
valueOrNull → A?

Available on Result<E, A>, provided by the ResultOps extension

The value if Success or Partial, null if Failure.
no setter

Methods

map<B>(B f(A)) Result<E, B>

Available on Result<E, A>, provided by the ResultOps extension

Transforms the value, preserving errors and consumed count.
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