mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
refactor: Un-callback transform Store::queryPathInfoFromClientCache
This part of the code was not necessarily callback based. Removing CPS is always nice; particularly if there's no loss of functionality, like here.
This commit is contained in:
parent
d0a284284b
commit
8983ee8b2e
2 changed files with 13 additions and 13 deletions
|
@ -285,14 +285,14 @@ public:
|
|||
/**
|
||||
* NOTE: this is not the final interface - to be modified in next commit.
|
||||
*
|
||||
* Asynchronous version that only queries the local narinfo cache and not
|
||||
* Version of queryPathInfo() that only queries the local narinfo cache and not
|
||||
* the actual store.
|
||||
*
|
||||
* @return true if the path was known and the callback invoked
|
||||
* @return false if the path was not known and the callback not invoked
|
||||
* @return `std::make_optional(vpi)` if the path is known
|
||||
* @return `std::null_opt` if the path was not known to be valid or invalid
|
||||
* @throw InvalidPathError if the path is known to be invalid
|
||||
*/
|
||||
bool queryPathInfoFromClientCache(const StorePath & path, Callback<ref<const ValidPathInfo>> & callback);
|
||||
std::optional<ref<const ValidPathInfo>> queryPathInfoFromClientCache(const StorePath & path);
|
||||
|
||||
/**
|
||||
* Query the information about a realisation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue