TErr<Value> class

Implemented types

Constructors

TErr(TError error)
const
TErr.from(TError type)
factory

Properties

error TError
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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 /(dynamic a) Error
Returns the error if it is CErr or throws an error if it is COk Convinient operator to get the error from the result, user should ensure that the result is CErr, otherwise it will throw an UnimplementedError Usage: final res = TResult
override
operator ==(Object other) bool
The equality operator.
inherited
operator |(dynamic _) → Value
Returns the value if it is TOk or throws an error if it is TErr Convinient operator to get the value from the result, user should ensure that the result is TOk, otherwise it will throw an UnimplementedError Usage: final res = TResult
override
operator ~() Error
Returns the value if it is TOk or error if it is TErr Convinient operator to get the value from the result, Usage:
override