Output sink that stores formatted characters in an internal fixed-size stack/inline buffer.
More...
|
| constexpr | buffer_sink () noexcept |
| | Constructs an empty buffer sink.
|
| |
| | ~buffer_sink ()=default |
| |
| RELOCO_BEGIN_UNSAFE_BUFFER_USAGE constexpr | buffer_sink (const buffer_sink &other) noexcept |
| |
| constexpr | buffer_sink (buffer_sink &&other) noexcept |
| |
| constexpr buffer_sink & | operator= (const buffer_sink &other) noexcept |
| |
| constexpr buffer_sink & | operator= (buffer_sink &&other) noexcept |
| |
| RELOCO_END_UNSAFE_BUFFER_USAGE RELOCO_CONSTEXPR20 sink | as_sink () &noexcept RELOCO_LIFETIMEBOUND |
| | Creates a type-erased sink adapter pointing to this instance.
|
| |
| constexpr microfmt::string_view | view () const &noexcept RELOCO_LIFETIMEBOUND |
| | Returns a string view over the characters written so far.
|
| |
| constexpr microfmt::string_view | view () const &&=delete |
| |
| constexpr std::size_t | size () const noexcept |
| | Returns the total number of characters written so far.
|
| |
| constexpr std::size_t | capacity () const noexcept |
| | Returns the maximum capacity of the buffer.
|
| |
| constexpr std::size_t | available () const noexcept |
| | Returns the remaining unwritten capacity in the buffer.
|
| |
| constexpr span< const char > | as_span () const &noexcept RELOCO_LIFETIMEBOUND |
| | Returns a microfmt::span view over the written portion of the buffer.
|
| |
| constexpr span< const char > | as_span () const &&=delete |
| |
| RELOCO_REINITIALIZES constexpr void | reset () noexcept |
| | Resets the write offset back to the beginning of the buffer.
|
| |
template<std::size_t N>
class microfmt::buffer_sink< N >
Output sink that stores formatted characters in an internal fixed-size stack/inline buffer.
Provides a self-contained, zero-allocation storage buffer of N bytes and exposes a type-erased sink interface. Writes exceeding the buffer capacity are safely truncated.
- Template Parameters
-
| N | The capacity of the internal storage buffer in bytes. |