mainargs

package mainargs

Members list

Type members

Classlikes

object ArgSig

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
ArgSig.type
class ArgSig extends Product, Serializable, Equals

Models what is known by the router about a single argument: that it has a longName, a human-readable typeString describing what the type is (just for logging and reading, not a replacement for a TypeTag) and possible a function that can compute its default value

Models what is known by the router about a single argument: that it has a longName, a human-readable typeString describing what the type is (just for logging and reading, not a replacement for a TypeTag) and possible a function that can compute its default value

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Compat

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Compat.type
case class Flag(value: Boolean)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Invoker

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Invoker.type
case class Leftover[T](value: T*)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Macros

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Macros.type
class MainData[T, B] extends Product, Serializable, Equals

What is known about a single endpoint for our routes. It has a name, flattenedArgSigs for each argument, and a macro-generated invoke0 that performs all the necessary argument parsing and de-serialization.

What is known about a single endpoint for our routes. It has a name, flattenedArgSigs for each argument, and a macro-generated invoke0 that performs all the necessary argument parsing and de-serialization.

Realistically, you will probably spend most of your time calling Invoker.invoke instead, which provides a nicer API to call it that mimmicks the API of calling a Scala method.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object MainData

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
MainData.type
case class MethodMains[B](value: Seq[MainData[Any, B]], base: () => B)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait ParamResult[+T]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Failure
class Success[T]
object ParamResult

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) extends Class[T]

Attributes

Companion
object
Supertypes
trait Class[T]
trait TokensReader[T]
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class ParserForMethods[B](val mains: MethodMains[B])

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Renderer

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Renderer.type
sealed trait Result[+T]

Represents what comes out of an attempt to invoke an Main. Could succeed with a value, but could fail in many different ways.

Represents what comes out of an attempt to invoke an Main. Could succeed with a value, but could fail in many different ways.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Result

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Result.type
case class TokenGrouping[B](remaining: List[String], grouped: Map[ArgSig, Seq[String]])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TokenGrouping

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait TokensReader[T]

Represents the ability to parse CLI input arguments into a type T

Represents the ability to parse CLI input arguments into a type T

Has a fixed number of direct subtypes - Simple, Constant, Flag, Leftover, and Class - but each of those can be extended by an arbitrary number of user-specified instances.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Class[T]
class ParserForClass[T]
trait Terminal[T]
trait Constant[T]
trait Flag
object FlagRead.type
trait ShortNamed[T]
trait Leftover[T, V]
class LeftoverRead[T]
trait Simple[T]
object BooleanRead.type
object ByteRead.type
object DoubleRead.type
object FloatRead.type
object IntRead.type
object LongRead.type
class MapRead[K, V]
class OptionRead[T]
class SeqRead[C, T]
object ShortRead.type
object StringRead.type
Show all
object TokensReader

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
object Util

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Util.type
class arg(val name: String, val short: Char, val doc: String, val noDefaultName: Boolean, val positional: Boolean, val hidden: Boolean) extends ClassfileAnnotation

Attributes

Supertypes
trait ClassfileAnnotation
trait ConstantAnnotation
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
Show all
class main(val name: String, val doc: String) extends ClassfileAnnotation

Attributes

Supertypes
trait ClassfileAnnotation
trait ConstantAnnotation
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
Show all