binderTo

Undocumented in source. Be warned that the author may not have intended to support it.
ResultOf!T
binderTo
(
T
)
(
string value
)
if (
__traits(compiles, to!T(value))
)

Examples

@CommandDefault
static struct S
{
    @ArgPositional
    int num;
}

alias Info = commandInfoFor!S;
enum Param = Info.positionalArgs[0];
S s;
assert(ArgBinder!().bind!Param("256", s).isOk);
assert(s.num == 256);
assert(!ArgBinder!().bind!Param("two five six", s).isOk);

Meta