Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::Args::Handler Struct Reference

#include <args.hh>

Public Member Functions

 Handler (std::function< void(std::vector< std::string >)> &&fun)
 
 Handler (std::function< void()> &&handler)
 
 Handler (std::function< void(std::string)> &&handler)
 
 Handler (std::function< void(std::string, std::string)> &&handler)
 
 Handler (std::vector< std::string > *dest)
 
 Handler (std::string *dest)
 
 Handler (std::optional< std::string > *dest)
 
 Handler (std::filesystem::path *dest)
 
 Handler (std::optional< std::filesystem::path > *dest)
 
template<class T>
 Handler (T *dest, const T &val)
 
template<class I>
 Handler (I *dest)
 
template<class I>
 Handler (std::optional< I > *dest)
 

Public Attributes

std::function< void(std::vector< std::string >)> fun
 
size_t arity
 

Detailed Description

Arguments (flags/options and positional) have a "handler" which is caused when the argument is parsed. The handler has an arbitrary side effect, including possible affect further command-line parsing.

There are many constructors in order to support many shorthand initializations, and this is used a lot.


The documentation for this struct was generated from the following file: