From abd5e7dec039386628223f886b33047734172c8d Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 26 Mar 2023 21:12:25 -0400 Subject: Extend internal API docs, part 2 Picking up from #8111. Co-authored-by: Eelco Dolstra --- src/libstore/store-cast.hh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libstore/store-cast.hh') diff --git a/src/libstore/store-cast.hh b/src/libstore/store-cast.hh index ff62fc359..ccd19e5ad 100644 --- a/src/libstore/store-cast.hh +++ b/src/libstore/store-cast.hh @@ -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 T & require(Store & store) { -- cgit v1.2.3