|
microfmt
Zero-allocation C++ formatting for constrained environments
|
#include <styled_sink.hpp>
Public Member Functions | |
| constexpr | limit_sink (sink target RELOCO_LIFETIME_CAPTURE_BY_THIS, size_t max_bytes) noexcept |
| limit_sink (const limit_sink &)=delete | |
| limit_sink & | operator= (const limit_sink &)=delete |
| limit_sink (limit_sink &&) noexcept=default | |
| limit_sink & | operator= (limit_sink &&) noexcept=default |
| sink | as_sink () &noexcept RELOCO_LIFETIMEBOUND |
| void | put (char c) noexcept |
| void | write (microfmt::string_view sv) noexcept |
| constexpr size_t | remaining () const noexcept |
| constexpr bool | capped () const noexcept |
A sink adapter that discards output after a fixed number of bytes.
|
inlineexplicitconstexprnoexcept |
Create an adapter that forwards at most max_bytes to target.
|
delete |
|
defaultnoexcept |
|
inlinenoexcept |
Return a type-erased sink suitable for format_to.
|
inlineconstexprnoexcept |
Return true when the configured byte limit has been reached.
|
delete |
|
defaultnoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
Return the number of bytes that can still be forwarded.
|
inlinenoexcept |