Class EventBus::Publisher
Defined in File event-bus.h
Nested Relationships
This class is a nested type of Class EventBus.
Class Documentation
-
class Publisher
Declaration:
finalCopyable notification handle that does not retain the bus or Context.
Empty/expired handles discard observations without copying payloads. Live handles use notify’s failure isolation and producer-thread delivery.
Public Functions
-
Publisher() = default
-
inline bool expired() const noexcept
Declaration:
[[nodiscard]]True for an empty handle or one whose bus state has ended; closure may reject before expiration.
-
template<::CE::Events::EventPayload Payload, typename Value>
inline void notify(const ::CE::Events::EventChannel<Payload> &event, Value &&payload, const ErrorHandler &errors = ErrorHandler{}) const noexcept Requires:
std::same_as<std::remove_cvref_t<Value>, Payload> && std::is_constructible_v<Payload, Value&&>Publish an exact-type observation; queued listeners retain their own error sinks.
Optional errors run synchronously and must not recursively notify this bus. This handle never extends the lifetime of a callback’s borrowed target.
-
Publisher() = default