Or

oxygen.cli.Params.Or
final case class Or[A](left: Params[A], right: Params[A]) extends Params[A]

Will attempt to parse left. If parsing left succeeds, parsing right will not be attempted, and this parser will succeed with left's success. If parsing left fails, parsing right will be attempted. If parsing right succeeds, this parser will succeed with right's success. If parsing right fails, this parser will fail with both the errors of left and right.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Params[A]
trait Parser[A]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def buildInternal(usedParams: Set[SimpleName]): Either[BuildError, (Set[SimpleName], Params[A])]

This should do 2 things:

This should do 2 things:

  1. Fail if there are duplicate param names
  2. Convert Defaultable.Auto into Defaultable.Some/Defaultable.None based on start of long name

Attributes

Definition Classes
override def helpMessage: ParamMessage

Attributes

Definition Classes
override def map[B](f: A => B): Params[B]

Attributes

Definition Classes
override def mapOrFail[B](f: A => Either[String, B]): Params[B]

Attributes

Definition Classes
override def optionalName: Option[Name]

Attributes

Definition Classes
override def parseParams(params: List[ParamLike]): ParseResult[A]

Attributes

Definition Classes

Inherited methods

final def &&[B](that: Params[B])(implicit zip: Zip[A, B]): Params[zip.Out]

Attributes

See also
Inherited from:
Params
final def <||[A2 >: A](that: Params[A2]): Params[A2]

Attributes

See also
Inherited from:
Params
final def <||[A2 >: A](that: Parser[A2]): Parser[A2]

Attributes

Inherited from:
Parser
final def <||>[B](that: Params[B]): Params[Either[A, B]]

Attributes

See also
Inherited from:
Params
final def <||>[B](that: Parser[B]): Parser[Either[A, B]]

Attributes

Inherited from:
Parser
final def ^>>[B](that: Parser[B])(implicit zip: Zip[A, B]): Parser[zip.Out]

Attributes

Inherited from:
Parser
final def apply(args: String*): FinalParseResult[A]

Attributes

Inherited from:
Parser
final def apply(args: List[String]): FinalParseResult[A]

Attributes

Inherited from:
Parser
final def bracketed(name: LongName): Values[A]

Attributes

Inherited from:
Parser
final def build: Either[BuildError, Parser[Either[HelpType, A]]]

Attributes

Inherited from:
Parser
final def optional: Params[Option[A]]

Attributes

Inherited from:
Params
final override def parse(values: List[ValueLike], params: List[ParamLike]): ParseResult[A]

Attributes

Definition Classes
Inherited from:
Params
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def repeated: Params[List[A]]

Attributes

Inherited from:
Params
final def repeatedNel: Params[NonEmptyList[A]]

Attributes

Inherited from:
Params
final def withDefault[A2 >: A](default: A2): Params[A2]

Attributes

Inherited from:
Params
final def withOptionalDefault[A2 >: A](default: Option[A2]): Params[A2]

Attributes

Inherited from:
Params
final def ||[A2 >: A](that: Params[A2]): Params[A2]

Attributes

See also
Inherited from:
Params