BoundaryOk<T> class
final
A successful boundary decode carrying the value of type T.
- Inheritance
-
- Object
- ZorphyBoundaryResult<
T> - BoundaryOk
Constructors
- BoundaryOk(T value)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isOk → bool
-
Whether this result is a successful BoundaryOk.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → T
-
The decoded value.
final
- valueOrNull → T?
-
The decoded value when isOk, otherwise
null.no setterinherited
Methods
-
fold<
R> (R onOk(T value), R onErr(BoundaryErr< T> error)) → R -
Bridges the boundary to a single value of type
R.inherited -
getOrThrow(
) → T -
Returns the decoded value, or throws a StateError describing the
violations when this is a BoundaryErr.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
Value equality on value, using
T's own==.override