ParseResult

kantan.csv.ParseResult
object ParseResult extends WithDefault[ParseError]

Provides convenience methods for creating instances of ParseResult.

Attributes

Graph
Supertypes
trait WithDefault[ParseError]
trait Simple[ParseError]
trait Simple[ParseError]
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Concrete methods

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.

Attributes

Example
scala> ParseResult.io(new java.io.IOException("some sort of io error"))
res0: ParseResult[Nothing] = Left(IOError: some sort of io error)
def noSuchElement: ParseResult[Nothing]

Creates a new ParseResult failure wrapping a ParseError.NoSuchElement error.

Creates a new ParseResult failure wrapping a ParseError.NoSuchElement error.

Attributes

Example
scala> ParseResult.noSuchElement
res0: ParseResult[Nothing] = Left(NoSuchElement: trying to read from an empty reader)

Inherited methods

def apply[S](s: => S): Either[ParseError, S]

Attempts to evaluate the specified expression.

Attempts to evaluate the specified expression.

Attributes

Inherited from:
WithDefault
def failure(f: ParseError): Either[ParseError, Nothing]

Turns the specified value into a failure.

Turns the specified value into a failure.

Attributes

Inherited from:
Simple
def fromTry[S](t: Try[S]): Either[ParseError, S]

Turns the specified Try into a result.

Turns the specified Try into a result.

Attributes

Inherited from:
WithDefault
def sequence[S, M <: (IterableOnce)](rs: M[Either[ParseError, S]])(implicit bf: BuildFrom[M[Either[ParseError, S]], S, M[S]]): Either[ParseError, M[S]]

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
def success[S](s: S): Either[ParseError, S]

Turns the specified value into a success.

Turns the specified value into a success.

Attributes

Inherited from:
Simple