object ParseResult extends WithDefault[ParseError]
Provides convenience methods for creating instances of ParseResult.
- Source
- ParseResult.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- ParseResult
- WithDefault
- Simple
- Simple
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- def apply[S](s: => S): Either[ParseError, S]
- Definition Classes
- WithDefault
- Annotations
- @inline()
- def failure(f: ParseError): Either[ParseError, Nothing]
- Definition Classes
- Simple
- Annotations
- @inline()
- def fromTry[S](t: Try[S]): Either[ParseError, S]
- Definition Classes
- WithDefault
- Annotations
- @inline()
- def io(e: Throwable): ParseResult[Nothing]
Creates a new ParseResult failure wrapping a ParseError.IOError error.
Creates a new ParseResult failure wrapping a ParseError.IOError error.
scala> ParseResult.io(new java.io.IOException("some sort of io error")) res0: ParseResult[Nothing] = Left(IOError: some sort of io error)
Example: - def noSuchElement: ParseResult[Nothing]
Creates a new ParseResult failure wrapping a ParseError.NoSuchElement error.
Creates a new ParseResult failure wrapping a ParseError.NoSuchElement error.
scala> ParseResult.noSuchElement res0: ParseResult[Nothing] = Left(NoSuchElement: trying to read from an empty reader)
Example: - def sequence[S, M[X] <: IterableOnce[X]](rs: M[Either[ParseError, S]])(implicit bf: BuildFrom[M[Either[ParseError, S]], S, M[S]]): Either[ParseError, M[S]]
- Definition Classes
- Simple
- Annotations
- @inline()
- def success[S](s: S): Either[ParseError, S]
- Definition Classes
- Simple
- Annotations
- @inline()