20 #ifndef RIPPLE_NODESTORE_ENCODEDBLOB_H_INCLUDED
21 #define RIPPLE_NODESTORE_ENCODEDBLOB_H_INCLUDED
23 #include <ripple/basics/Buffer.h>
24 #include <ripple/nodestore/NodeObject.h>
25 #include <boost/align/align_up.hpp>
87 "EncodedBlob: unseated std::shared_ptr used.");
89 return obj->getData().size() + 9;
111 [[nodiscard]]
void const*
114 return static_cast<void const*
>(
key_.
data());
123 [[nodiscard]]
void const*
126 return static_cast<void const*
>(
ptr_);
EncodedBlob(std::shared_ptr< NodeObject > const &obj)
void const * getData() const noexcept
std::uint32_t size_
The size of the serialized data.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::size_t getSize() const noexcept
Convert a NodeObject from in-memory to database format.
std::array< std::uint8_t, 32 > key_
The 32-byte key of the serialized object.
std::array< std::uint8_t, boost::alignment::align_up(9+1024, alignof(std::uint32_t))> payload_
A pre-allocated buffer for the serialized object.
std::uint8_t *const ptr_
A pointer to the serialized data.
void const * getKey() const noexcept