|
MDBX_CXX20_CONSTEXPR allocator_type | get_allocator () const |
| Returns the associated allocator. More...
|
|
MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX20_CONSTEXPR bool | is_freestanding () const noexcept |
| Checks whether data chunk stored inside the buffer, otherwise buffer just refers to data located outside the buffer. More...
|
|
MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX20_CONSTEXPR bool | is_reference () const noexcept |
| Checks whether the buffer just refers to data located outside the buffer, rather than stores it. More...
|
|
MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX20_CONSTEXPR size_t | capacity () const noexcept |
| Returns the number of bytes that can be held in currently allocated storage. More...
|
|
MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX20_CONSTEXPR size_t | headroom () const noexcept |
| Returns the number of bytes that available in currently allocated storage ahead the currently beginning of data. More...
|
|
MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX20_CONSTEXPR size_t | tailroom () const noexcept |
| Returns the number of bytes that available in currently allocated storage after the currently data end. More...
|
|
const MDBX_CXX11_CONSTEXPR byte * | byte_ptr () const noexcept |
| Returns casted to const pointer to byte an address of data. More...
|
|
const MDBX_CXX11_CONSTEXPR byte * | end_byte_ptr () const noexcept |
| Returns casted to const pointer to byte an end of data. More...
|
|
MDBX_CXX11_CONSTEXPR byte * | byte_ptr () noexcept |
| Returns casted to pointer to byte an address of data. More...
|
|
MDBX_CXX11_CONSTEXPR byte * | end_byte_ptr () noexcept |
| Returns casted to pointer to byte an end of data. More...
|
|
const MDBX_CXX11_CONSTEXPR char * | char_ptr () const noexcept |
| Returns casted to const pointer to char an address of data. More...
|
|
const MDBX_CXX11_CONSTEXPR char * | end_char_ptr () const noexcept |
| Returns casted to const pointer to char an end of data. More...
|
|
MDBX_CXX11_CONSTEXPR char * | char_ptr () noexcept |
| Returns casted to pointer to char an address of data. More...
|
|
MDBX_CXX11_CONSTEXPR char * | end_char_ptr () noexcept |
| Returns casted to pointer to char an end of data. More...
|
|
const MDBX_CXX11_CONSTEXPR void * | data () const noexcept |
| Return a const pointer to the beginning of the referenced data. More...
|
|
const MDBX_CXX11_CONSTEXPR void * | end () const noexcept |
| Return a const pointer to the end of the referenced data. More...
|
|
MDBX_CXX11_CONSTEXPR void * | data () noexcept |
| Return a pointer to the beginning of the referenced data. More...
|
|
MDBX_CXX11_CONSTEXPR void * | end () noexcept |
| Return a pointer to the end of the referenced data. More...
|
|
MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX14_CONSTEXPR size_t | length () const noexcept |
| Returns the number of bytes. More...
|
|
MDBX_CXX14_CONSTEXPR buffer & | set_length (size_t bytes) |
| Set length of data. More...
|
|
MDBX_CXX14_CONSTEXPR buffer & | set_end (const void *ptr) |
| Sets the length by specifying the end of the data. More...
|
|
void | make_freestanding () |
| Makes buffer owning the data. More...
|
|
MDBX_CXX20_CONSTEXPR | buffer () noexcept=default |
|
MDBX_CXX20_CONSTEXPR | buffer (const allocator_type &allocator) noexcept |
|
| buffer (const struct slice &src, bool make_reference, const allocator_type &allocator=allocator_type()) |
|
| buffer (const buffer &src, bool make_reference, const allocator_type &allocator=allocator_type()) |
|
| buffer (const void *ptr, size_t bytes, bool make_reference, const allocator_type &allocator=allocator_type()) |
|
template<class CHAR , class T , class A > |
| buffer (const ::std::basic_string< CHAR, T, A > &)=delete |
|
template<class CHAR , class T , class A > |
| buffer (const ::std::basic_string< CHAR, T, A > &&)=delete |
|
| buffer (const char *c_str, bool make_reference, const allocator_type &allocator=allocator_type()) |
|
template<class CHAR , class T > |
| buffer (const ::std::basic_string_view< CHAR, T > &view, bool make_reference, const allocator_type &allocator=allocator_type()) |
|
MDBX_CXX20_CONSTEXPR | buffer (const struct slice &src, const allocator_type &allocator=allocator_type()) |
|
MDBX_CXX20_CONSTEXPR | buffer (const buffer &src, const allocator_type &allocator=allocator_type()) |
|
MDBX_CXX20_CONSTEXPR | buffer (const void *ptr, size_t bytes, const allocator_type &allocator=allocator_type()) |
|
template<class CHAR , class T , class A > |
MDBX_CXX20_CONSTEXPR | buffer (const ::std::basic_string< CHAR, T, A > &str, const allocator_type &allocator=allocator_type()) |
|
MDBX_CXX20_CONSTEXPR | buffer (const char *c_str, const allocator_type &allocator=allocator_type()) |
|
template<class CHAR , class T > |
MDBX_CXX20_CONSTEXPR | buffer (const ::std::basic_string_view< CHAR, T > &view, const allocator_type &allocator=allocator_type()) |
|
| buffer (size_t head_room, size_t tail_room, const allocator_type &allocator=allocator_type()) |
|
| buffer (size_t capacity, const allocator_type &allocator=allocator_type()) |
|
| buffer (size_t head_room, const struct slice &src, size_t tail_room, const allocator_type &allocator=allocator_type()) |
|
| buffer (size_t head_room, const buffer &src, size_t tail_room, const allocator_type &allocator=allocator_type()) |
|
| buffer (const ::mdbx::txn &txn, const struct slice &src, const allocator_type &allocator=allocator_type()) |
|
| buffer (buffer &&src) noexcept(move_assign_alloc::is_nothrow()) |
|
MDBX_CXX11_CONSTEXPR const struct slice & | slice () const noexcept |
|
MDBX_CXX11_CONSTEXPR | operator const struct slice & () const noexcept |
|
void | reserve (size_t wanna_headroom, size_t wanna_tailroom) |
| Reserves storage space. More...
|
|
void | reserve_headroom (size_t wanna_headroom) |
| Reserves space before the payload. More...
|
|
void | reserve_tailroom (size_t wanna_tailroom) |
| Reserves space after the payload. More...
|
|
buffer & | assign_reference (const void *ptr, size_t bytes) |
|
buffer & | assign_freestanding (const void *ptr, size_t bytes) |
|
MDBX_CXX20_CONSTEXPR void | swap (buffer &other) noexcept(swap_alloc::is_nothrow()) |
|
buffer & | assign (const buffer &src, bool make_reference=false) |
|
buffer & | assign (const void *ptr, size_t bytes, bool make_reference=false) |
|
buffer & | assign (const struct slice &src, bool make_reference=false) |
|
buffer & | assign (const ::MDBX_val &src, bool make_reference=false) |
|
buffer & | assign (struct slice &&src, bool make_reference=false) |
|
buffer & | assign (::MDBX_val &&src, bool make_reference=false) |
|
buffer & | assign (const void *begin, const void *end, bool make_reference=false) |
|
template<class CHAR , class T , class A > |
buffer & | assign (const ::std::basic_string< CHAR, T, A > &str, bool make_reference=false) |
|
buffer & | assign (const char *c_str, bool make_reference=false) |
|
buffer & | operator= (const buffer &src) |
|
buffer & | operator= (buffer &&src) noexcept(move_assign_alloc::is_nothrow()) |
|
buffer & | operator= (const struct slice &src) |
|
buffer & | operator= (struct slice &&src) |
|
template<class CHAR , class T > |
buffer & | operator= (const ::std::basic_string_view< CHAR, T > &view) noexcept |
|
template<class CHAR = char, class T = ::std::char_traits<CHAR>> |
::std::basic_string_view< CHAR, T > | string_view () const noexcept |
| Return a string_view that references the data of this buffer. More...
|
|
template<class CHAR , class T > |
| operator::std::basic_string_view () const noexcept |
| Return a string_view that references the data of this buffer. More...
|
|
MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX20_CONSTEXPR bool | empty () const noexcept |
| Checks whether the string is empty. More...
|
|
MDBX_CXX11_CONSTEXPR bool | is_null () const noexcept |
| Checks whether the data pointer of the buffer is nullptr. More...
|
|
MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX20_CONSTEXPR size_t | size () const noexcept |
| Returns the number of bytes. More...
|
|
MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX14_CONSTEXPR size_t | hash_value () const noexcept |
| Returns the hash value of the data. More...
|
|
template<class CHAR = char, class T = ::std::char_traits<CHAR>, class A = legacy_allocator> |
MDBX_CXX20_CONSTEXPR ::std::basic_string< CHAR, T, A > | as_string (const A &allocator=A()) const |
|
template<class CHAR , class T , class A > |
MDBX_CXX20_CONSTEXPR | operator::std::basic_string () const |
|
MDBX_NOTHROW_PURE_FUNCTION bool | starts_with (const struct slice &prefix) const noexcept |
| Checks if the data starts with the given prefix. More...
|
|
MDBX_NOTHROW_PURE_FUNCTION bool | ends_with (const struct slice &suffix) const noexcept |
| Checks if the data ends with the given suffix. More...
|
|
void | clear () noexcept |
| Clears the contents and storage. More...
|
|
void | shrink_to_fit () |
| Reduces memory usage by freeing unused storage space. More...
|
|
void | remove_prefix (size_t n) noexcept |
| Drops the first "n" bytes from the data chunk. More...
|
|
void | remove_suffix (size_t n) noexcept |
| Drops the last "n" bytes from the data chunk. More...
|
|
void | safe_remove_prefix (size_t n) |
| Drops the first "n" bytes from the data chunk. More...
|
|
void | safe_remove_suffix (size_t n) |
| Drops the last "n" bytes from the data chunk. More...
|
|
MDBX_CXX11_CONSTEXPR byte | operator[] (size_t n) const noexcept |
| Accesses the specified byte of data chunk. More...
|
|
MDBX_CXX11_CONSTEXPR byte & | operator[] (size_t n) noexcept |
| Accesses the specified byte of data chunk. More...
|
|
MDBX_CXX14_CONSTEXPR byte | at (size_t n) const |
| Accesses the specified byte of data chunk with bounds checking. More...
|
|
MDBX_CXX14_CONSTEXPR byte & | at (size_t n) |
| Accesses the specified byte of data chunk with bounds checking. More...
|
|
MDBX_CXX14_CONSTEXPR struct slice | head (size_t n) const noexcept |
| Returns the first "n" bytes of the data chunk. More...
|
|
MDBX_CXX14_CONSTEXPR struct slice | tail (size_t n) const noexcept |
| Returns the last "n" bytes of the data chunk. More...
|
|
MDBX_CXX14_CONSTEXPR struct slice | middle (size_t from, size_t n) const noexcept |
| Returns the middle "n" bytes of the data chunk. More...
|
|
MDBX_CXX14_CONSTEXPR struct slice | safe_head (size_t n) const |
| Returns the first "n" bytes of the data chunk. More...
|
|
MDBX_CXX14_CONSTEXPR struct slice | safe_tail (size_t n) const |
| Returns the last "n" bytes of the data chunk. More...
|
|
MDBX_CXX14_CONSTEXPR struct slice | safe_middle (size_t from, size_t n) const |
| Returns the middle "n" bytes of the data chunk. More...
|
|
buffer & | append (const void *src, size_t bytes) |
|
buffer & | append (const struct slice &chunk) |
|
buffer & | add_header (const void *src, size_t bytes) |
|
buffer & | add_header (const struct slice &chunk) |
|
template<MDBX_CXX20_CONCEPT(MutableByteProducer, PRODUCER) > |
buffer & | append_producer (PRODUCER &producer) |
|
template<MDBX_CXX20_CONCEPT(ImmutableByteProducer, PRODUCER) > |
buffer & | append_producer (const PRODUCER &producer) |
|
buffer & | append_hex (const struct slice &data, bool uppercase=false, unsigned wrap_width=0) |
|
buffer & | append_base58 (const struct slice &data, unsigned wrap_width=0) |
|
buffer & | append_base64 (const struct slice &data, unsigned wrap_width=0) |
|
buffer & | append_decoded_hex (const struct slice &data, bool ignore_spaces=false) |
|
buffer & | append_decoded_base58 (const struct slice &data, bool ignore_spaces=false) |
|
buffer & | append_decoded_base64 (const struct slice &data, bool ignore_spaces=false) |
|
template<class ALLOCATOR , typename CAPACITY_POLICY > |
| buffer (const txn &txn, const struct slice &src, const allocator_type &allocator) |
|