microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Public Member Functions | List of all members
microfmt::asio_streambuf_sink Class Reference

A sink adapter that writes formatted output into a boost::asio::streambuf dynamic buffer. More...

#include <asio_sink.hpp>

Public Member Functions

 asio_streambuf_sink (boost::asio::streambuf &buf RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS, size_t max_chars=1024) noexcept
 Constructs a sink over an externally owned Boost.Asio streambuf.
 
sink as_sink () noexcept RELOCO_LIFETIMEBOUND
 Creates a type-erased sink adapter pointing to this instance.
 

Detailed Description

A sink adapter that writes formatted output into a boost::asio::streambuf dynamic buffer.

Constructor & Destructor Documentation

◆ asio_streambuf_sink()

microfmt::asio_streambuf_sink::asio_streambuf_sink ( boost::asio::streambuf &buf RELOCO_LIFETIMEBOUND  RELOCO_LIFETIME_CAPTURE_BY_THIS,
size_t  max_chars = 1024 
)
inlineexplicitnoexcept

Constructs a sink over an externally owned Boost.Asio streambuf.

Parameters
bufTarget streambuf; it must outlive this sink.
max_charsMaximum number of characters accepted before further writes are silently dropped.

Member Function Documentation

◆ as_sink()

sink microfmt::asio_streambuf_sink::as_sink ( )
inlinenoexcept

Creates a type-erased sink adapter pointing to this instance.


The documentation for this class was generated from the following file: