mirror of
https://github.com/NixOS/nix.git
synced 2025-11-17 07:52:43 +01:00
Extend internal API docs, part 2
Picking up from #8111. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
parent
8ae9d66940
commit
abd5e7dec0
32 changed files with 640 additions and 359 deletions
|
|
@ -4,6 +4,13 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
/**
|
||||
* Helper to try downcasting a Store with a nice method if it fails.
|
||||
*
|
||||
* This is basically an alternative to the user-facing part of
|
||||
* Store::unsupported that allows us to still have a nice message but
|
||||
* better interface design.
|
||||
*/
|
||||
template<typename T>
|
||||
T & require(Store & store)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue