|
conduit 0.6.0
Modern C++23 header-only event-dispatching / event-transport library
|
Polymorphic envelope cell. More...
#include <envelope.hpp>


Public Member Functions | |
| EventEnvelope () | |
| template<typename T > requires std::derived_from<T, parcel::ICell> | |
| EventEnvelope (T payload) | |
| Build an envelope around a typed payload event. | |
| EventEnvelope (detail::EnvelopeCore core, parcel::cell_t payload) | |
| EventEnvelope (std::shared_ptr< detail::EnvelopeCore > core) | |
| const ulid::Ulid & | id () const noexcept |
| std::string_view | name () const noexcept |
| const flags::FlagSet & | flags () const noexcept |
| const Metadata & | metadata () const noexcept |
| const Timestamps & | timestamps () const noexcept |
| const std::optional< ulid::Ulid > & | correlation_id () const noexcept |
| const std::optional< ulid::Ulid > & | causation_id () const noexcept |
| const parcel::cell_t & | payload_cell () const noexcept |
| template<typename T > | |
| std::shared_ptr< const T > | payload_as () const noexcept |
Typed payload accessor: returns shared_ptr<const T> if the underlying payload is a T cell, or nullptr otherwise. | |
| Timestamps & | timestamps () noexcept |
| Metadata & | metadata () noexcept |
| flags::FlagSet & | flags () noexcept |
| std::shared_ptr< detail::EnvelopeCore > | core_ptr () const noexcept |
| bool | valid () const noexcept |
| std::string | to_string () const override |
| parcel::json_t | to_json () const override |
| std::partial_ordering | compare (parcel::ICell const &other) const override |
Static Public Member Functions | |
| static parcel::cell_t | from_json (parcel::json_t const &j, parcel::ParcelRegistry const ®) |
| static parcel::cell_type_descriptor_t | descriptor () |
Static Public Attributes | |
| static constexpr std::string_view | kind_id = "conduit:envelope" |
Polymorphic envelope cell.
Holds bookkeeping (id, flags, metadata, timestamps, correlation/causation ids) plus a parcel::cell_t payload — so any registered event cell can ride inside the same envelope kind.
Storage is a shared_ptr<detail::EnvelopeCore> so copies share the same mutable core: transports that adjust timestamps()/metadata() on a local copy update the originating envelope as well.
|
inline |
|
inlineexplicit |
Build an envelope around a typed payload event.
T must derive from conduit::Event<T, Name> (i.e. be an ICell-derived cell).
|
inline |
|
inlineexplicit |
|
inlinenoexcept |
|
inlineoverride |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestatic |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestatic |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Typed payload accessor: returns shared_ptr<const T> if the underlying payload is a T cell, or nullptr otherwise.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineoverride |
|
inlineoverride |
|
inlinenoexcept |
|
staticconstexpr |