11 return Record(name, std::move(
result),
false);
16 return Record(name, std::move(
result),
true);
25 _failures.push_back({.Name = std::string(name), .Reason = std::move(
result.error().Detail), .Required =
required});
32 std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - _started);
33 std::string
out = std::format(
"Load took {} ms",
elapsed.count());
34 if (_failures.empty())
39 out += std::format(
"; {} failed:", _failures.size());
42 out += std::format(
"\n {} {}: {}",
failed.Required ?
"required" :
"optional",
failed.Name,
failed.Reason);
50 if (
it == _failures.end())
54 return it->Reason.empty() ?
it->Name : std::format(
"{}: {}",
it->Name,
it->Reason);
std::string Summary() const
std::string AbortReason() const
bool Optional(std::string_view name, Status result)
bool Required(std::string_view name, Status result)
static std::string ReadFile(const std::filesystem::path &path)
std::expected< void, Error > Status
bool Required
A required failure refuses the plugin.