microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Functions
microfmt::coro Namespace Reference

Functions

template<typename Stream , std::size_t StackSize = 256, typename... Args>
boost::asio::awaitable< std::size_t > async_format_to (Stream &stream, string_view fmt, Args &&...args)
 Formats a message directly into a stack buffer and asynchronously writes it to a Boost.Asio stream.
 

Function Documentation

◆ async_format_to()

template<typename Stream , std::size_t StackSize = 256, typename... Args>
boost::asio::awaitable< std::size_t > microfmt::coro::async_format_to ( Stream &  stream,
string_view  fmt,
Args &&...  args 
)

Formats a message directly into a stack buffer and asynchronously writes it to a Boost.Asio stream.

Template Parameters
StreamAsync stream type (e.g., boost::asio::ip::tcp::socket, boost::asio::serial_port).
StackSizeSize of the local stack buffer used for formatting.
ArgsFormatting argument types.
Parameters
streamTarget asynchronous stream. Must remain valid until the returned awaitable completes; the coroutine holds a reference to it across suspension points.
fmtFormat string view.
argsArguments to format.
Returns
boost::asio::awaitable<std::size_t> resolving to the number of bytes written upon completion.