given_SingleValueConverter_Backend

dfhdl.app.BackendValueConverter$package.given_SingleValueConverter_Backend

Attributes

Graph
Supertypes
trait SingleValueConverter[Backend]
trait ValueConverter[Backend]
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def parse(arg: String): Either[String, Option[Backend]]

Inherited methods

def argFormat(name: String): String

Transformation of argument name to argument definition in help.

Transformation of argument name to argument definition in help.

Attributes

Inherited from:
ValueConverter
def flatMap[B](fn: Backend => Either[String, Option[B]]): ValueConverter[B]

Map the converter to another value. This method is different from .map because it can return an error (without resorting to exceptions, returning Left(msg)) or can filter out unsupported values (by returning Right(None)).

Map the converter to another value. This method is different from .map because it can return an error (without resorting to exceptions, returning Left(msg)) or can filter out unsupported values (by returning Right(None)).

Attributes

Inherited from:
ValueConverter
def map[B](fn: Backend => B): ValueConverter[B]

Maps the converter to another value:

Maps the converter to another value:

intConverter.map(_+2) // and you get a "biased converter"

Attributes

Inherited from:
ValueConverter
final def parse(args: List[(String, List[String])]): Either[String, Option[Backend]]

Takes a list of arguments to all option invocations: for example, "-a 1 2 -a 3 4 5" would produce List(("a",List(1,2)),("a",List(3,4,5))).

Takes a list of arguments to all option invocations: for example, "-a 1 2 -a 3 4 5" would produce List(("a",List(1,2)),("a",List(3,4,5))).

  • parse returns Left, if there was an error while parsing.

  • if no option was found, it returns Right(None).

  • if option was found, it returns Right(...).

Attributes

Inherited from:
SingleValueConverter
def parseCached(s: List[(String, List[String])]): Either[String, Option[Backend]]

Attributes

Inherited from:
ValueConverter

Inherited fields

final val argType: SINGLE.type

Type of parsed argument list.

Type of parsed argument list.

Attributes

Inherited from:
SingleValueConverter