DecodeResult
Provides convenience methods for creating instances of DecodeResult.
Attributes
- Graph
-
- Supertypes
-
class WithError[DecodeError]trait WithDefault[DecodeError]trait Simple[DecodeError]trait Simple[DecodeError]class Objecttrait Matchableclass AnyShow all
- Self type
-
DecodeResult.type
Members list
Value members
Concrete methods
Creates a new DecodeResult failure wrapping a DecodeError.OutOfBounds error.
Creates a new DecodeResult failure wrapping a DecodeError.OutOfBounds error.
Attributes
- Example
-
scala> DecodeResult.outOfBounds(1) res0: DecodeResult[Nothing] = Left(OutOfBounds: 1 is not a valid index)
Creates a new DecodeResult failure wrapping a DecodeError.TypeError error.
Creates a new DecodeResult failure wrapping a DecodeError.TypeError error.
Attributes
- Example
-
scala> DecodeResult.typeError("not a valid int") res0: DecodeResult[Nothing] = Left(TypeError: not a valid int)
Creates a new DecodeResult failure wrapping a DecodeError.TypeError error.
Creates a new DecodeResult failure wrapping a DecodeError.TypeError error.
Attributes
- Example
-
scala> DecodeResult.typeError(new Exception("not a valid int")) res0: DecodeResult[Nothing] = Left(TypeError: not a valid int)
Inherited methods
Attempts to evaluate the specified expression.
Attempts to evaluate the specified expression.
Attributes
- Inherited from:
- WithDefault
Turns the specified value into a failure.
Turns the specified value into a failure.
Attributes
- Inherited from:
- Simple
Turns an exception into an error.
Turns an exception into an error.
Attributes
- Definition Classes
-
WithError -> WithDefault
- Inherited from:
- WithError
Turns the specified Try
into a result.
Turns the specified Try
into a result.
Attributes
- Inherited from:
- WithDefault
Turns a collection of results into a result of a collection.
Turns a collection of results into a result of a collection.
Attributes
- Inherited from:
- Simple
Turns the specified value into a success.
Turns the specified value into a success.
Attributes
- Inherited from:
- Simple