|
microfmt
Zero-allocation C++ formatting for constrained environments
|
#include <styled_sink.hpp>
Public Member Functions | |
| constexpr | prefix_sink (sink target RELOCO_LIFETIME_CAPTURE_BY_THIS, microfmt::string_view prefix RELOCO_LIFETIME_CAPTURE_BY_THIS=" ") noexcept |
| prefix_sink (const prefix_sink &)=delete | |
| prefix_sink & | operator= (const prefix_sink &)=delete |
| prefix_sink (prefix_sink &&) noexcept=default | |
| prefix_sink & | operator= (prefix_sink &&) noexcept=default |
| sink | as_sink () &noexcept RELOCO_LIFETIMEBOUND |
| void | set_prefix (microfmt::string_view p RELOCO_LIFETIME_CAPTURE_BY_THIS) noexcept |
| void | put (char c) noexcept |
| void | write (microfmt::string_view sv) noexcept |
A sink adapter that writes a prefix at the start of each output line.
The configured prefix is emitted lazily, before the first character of a line. This preserves line state when formatting is split across multiple calls.
|
inlineexplicitconstexprnoexcept |
Create a line-prefix adapter that forwards to target.
|
delete |
|
defaultnoexcept |
|
inlinenoexcept |
Return a type-erased sink suitable for format_to.
|
delete |
|
defaultnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Change the prefix used for subsequent lines.
|
inlinenoexcept |