Combines message information and an owned message content buffer. More...
#include <eagine/message_bus/message.hpp>
Public Member Functions | |
| stored_message ()=default | |
| Default constructor. | |
| stored_message (message_view message, memory::buffer buf) noexcept | |
| Construction from a message view and storage buffer. Adopts the buffer and copies the content from the message view into it. | |
| operator message_view () const | |
| Conversion to message view. | |
| template<typename Source > | |
| void | fetch_all_from (Source &source) |
| Copies the remaining data from the specified serialization source. | |
| void | store_content (memory::const_block blk) |
| Copies the content from the given block into the internal buffer. | |
| template<typename Value > | |
| auto | store_value (const Value &value, span_size_t max_size) -> bool |
| Serializes and stores the specified value (up to max_size). | |
| template<typename Value > | |
| auto | fetch_value (Value &value) -> bool |
| Deserializes the stored content into the specified value. | |
| auto | storage () noexcept -> memory::block |
| Returns a mutable view of the storage buffer. | |
| auto | data () const noexcept -> memory::const_block |
| Returns a const view of the storage buffer. | |
| auto | is_signed () const noexcept -> bool |
| Indicates if the header or the content is signed. More... | |
| auto | signature () const noexcept -> memory::const_block |
| Returns the message signature. More... | |
| auto | content () noexcept -> memory::block |
| Returns a mutable view of the data content of the message. More... | |
| auto | content () const noexcept -> memory::const_block |
| Returns a const view of the data content of the message. More... | |
| auto | text_content () noexcept |
| Returns the content as a mutable string view. More... | |
| auto | text_content () const noexcept |
| Returns the content as a const string view. More... | |
| void | clear_data () noexcept |
| Clears the content of the storage buffer. | |
| auto | release_buffer () noexcept -> memory::buffer |
| Releases and returns the storage buffer (without clearing it). | |
| auto | store_and_sign (memory::const_block data, span_size_t max_size, context &, main_ctx_object &) -> bool |
| Stores the specified data and signs it. | |
| auto | verify_bits (context &, main_ctx_object &) const noexcept -> verification_bits |
| Verifies the signatures of this message. | |
Additional Inherited Members |
Combines message information and an owned message content buffer.
|
inlinenoexcept |
Returns a const view of the data content of the message.
|
inlinenoexcept |
Returns a mutable view of the data content of the message.
Referenced by text_content().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Returns the content as a const string view.
|
inlinenoexcept |
Returns the content as a mutable string view.