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

Zero-allocation GDB Remote Serial Protocol packet builder sink. More...

#include <gdb_stream.hpp>

Public Member Functions

constexpr gdb_packet_writer (span< char > buffer RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS) noexcept
 
sink as_sink () noexcept RELOCO_LIFETIMEBOUND
 Creates a type-erased sink adapter for formatting.
 
string_view finalize () noexcept RELOCO_LIFETIMEBOUND
 Finalizes the packet by appending #XX checksum.
 
constexpr bool is_finalized () const noexcept
 

Detailed Description

Zero-allocation GDB Remote Serial Protocol packet builder sink.

Automatically frames output as $data#checksum into a caller-provided stack buffer.

Constructor & Destructor Documentation

◆ gdb_packet_writer()

constexpr microfmt::gdb::gdb_packet_writer::gdb_packet_writer ( span< char > buffer RELOCO_LIFETIMEBOUND  RELOCO_LIFETIME_CAPTURE_BY_THIS)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ as_sink()

sink microfmt::gdb::gdb_packet_writer::as_sink ( )
inlinenoexcept

Creates a type-erased sink adapter for formatting.

◆ finalize()

string_view microfmt::gdb::gdb_packet_writer::finalize ( )
inlinenoexcept

Finalizes the packet by appending #XX checksum.

Returns
A string view over the complete framed packet, or empty on overflow.

◆ is_finalized()

constexpr bool microfmt::gdb::gdb_packet_writer::is_finalized ( ) const
inlineconstexprnoexcept

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