string_transport class
#include <nxtio/buffers.hpp>
In-memory transport for tests, fixtures, and replay harnesses.
Constructors, destructors, conversion operators
-
string_transport(std::
span<const std:: string_view> chunks) explicit - Borrow incoming chunks; outgoing bytes are collected.
Public functions
-
auto read_some(std::
span<std:: byte> dst) → nxt:: task<std:: size_t> - Read from the borrowed input source.
-
auto write_all(std::
span<const std:: byte> bytes) → nxt:: task - Write raw bytes to the collected output.
-
auto write_all(std::
string_view text) → nxt:: task - Write text bytes to the collected output.
-
auto written() const → const std::
string& noexcept - Return all bytes written through this transport.