|
microfmt
Zero-allocation C++ formatting for constrained environments
|
Formatter for reloco::obfuscated_string_ref – the type-erased handle (see RELOCO_DECLARE_OBFUSCATED_STR/RELOCO_DEFINE_OBFUSCATED_STR in obfuscated_string.hpp).
More...
#include <reloco.hpp>
Public Member Functions | |
| constexpr void | parse (format_parse_context &) const noexcept |
| void | format (reloco::obfuscated_string_ref val, const sink &out) const noexcept |
Formatter for reloco::obfuscated_string_ref – the type-erased handle (see RELOCO_DECLARE_OBFUSCATED_STR/RELOCO_DEFINE_OBFUSCATED_STR in obfuscated_string.hpp).
Decodes and writes one byte at a time directly to out via for_each_byte(): the plaintext is never materialized as a contiguous buffer anywhere, not even transiently – a stronger guarantee than formatter<reloco::obfuscated_decrypted_view<N>> above. This is also the single, non-template formatter formatter<reloco::obfuscated_string<N>> below delegates to for every N, so no formatting logic is duplicated per obfuscated-string length.
Because there is no materialized string_view to inspect, this formatter does not support formatter<microfmt::string_view>'s {:?} debug-quoting flag – {}/{:?} both write the raw decoded bytes, exactly like microfmt's own numeric formatters, whose Debug and Display forms coincide. Reach for obfuscated_string<N>::decrypt() directly if quoting is needed.
|
inlinenoexcept |
|
inlineconstexprnoexcept |