47 void RemoveListener();
50 std::function<Result<Subscription>()> _install;
An engine hook that exists only while one of its events has handlers.
bool Installed() const noexcept
LazyHook & operator=(const LazyHook &)=delete
LazyHook(const LazyHook &)=delete
EventLifecycle ForEvent()
int ListeningEvents() const noexcept
Owns one registration and releases it on destruction.
static std::string ReadFile(const std::filesystem::path &path)
std::expected< T, Error > Result
Starting and stopping an Event source, driven by whether anything is listening.