jaster.cli.binder

Utility for binding a string into arbitrary types, using user-defined functions.

Members

Functions

convBinder
Result!T convBinder(string arg)

arg -> numeric | enum | bool. The result is arg converted to T.

stringBinder
Result!string stringBinder(string arg)

arg -> string. The result is the contents of arg as-is.

Structs

ArgBindWith
struct ArgBindWith(alias Func)

Attach this onto an argument/provide it directly to ArgBinder.bind, to specify a specific function to use when binding the argument, instead of relying on ArgBinder's default behaviour.

ArgBinder
struct ArgBinder(Modules...)

A static struct providing functionality for binding a string (the argument) to a value, as well as optionally validating it.

ArgBinderFunc
struct ArgBinderFunc

Attach this to any free-standing function to mark it as an argument binder.

ArgValidator
struct ArgValidator

Attach this to any struct to specify that it can be used as an arg validator.

PostValidate
struct PostValidate(alias Func)

An @ArgValidator that runs the given Func during post-binding validation.

PreValidate
struct PreValidate(alias Func)

An @ArgValidator that runs the given Func during pre-binding validation.

Meta