io namespace
Namespaces
- namespace arrow
- namespace detail
- namespace http
- namespace llm
- Compatibility aliases for the old
nxt::namespace.io:: llm - namespace net
- namespace nxtllm
- Compatibility aliases for the old
nxt::trace namespace.io:: nxtllm
Classes
- struct buffer_error
- Base exception for buffered byte I/O helpers.
- class byte_cursor
- Synchronous cursor over an already-buffered byte span.
-
template <typename Source>class byte_reader
- Buffered asynchronous reader over any source with a
read_somemethod. -
template <typename Sink>class byte_writer
- Buffered asynchronous writer over any sink with a
write_allmethod. - struct end_of_stream
- Raised when a reader needs more bytes but the source ended.
- struct operation_cancelled
- Raised when a stop token cancels a buffered operation.
- class string_sink
- In-memory sink that appends all writes to a string.
- class string_source
- Borrowed in-memory source exposed through
read_some. - class string_transport
- In-memory transport for tests, fixtures, and replay harnesses.
Functions
-
auto as_bytes(std::
string_view text) → std:: span<const std:: byte> noexcept - Reinterpret a string view as immutable bytes.
-
auto as_chars(std::
span<const std:: byte> bytes) → std:: span<const char> noexcept - Reinterpret immutable bytes as chars.
-
auto as_string_view(std::
span<const std:: byte> bytes) → std:: string_view noexcept - View a byte span as immutable character data.
-
auto as_writable_chars(std::
span<std:: byte> bytes) → std:: span<char> noexcept - Reinterpret writable bytes as writable chars.
Function documentation
std:: span<const std:: byte> nxt:: io:: as_bytes(std:: string_view text) noexcept
#include <nxtio/buffers.hpp>
Reinterpret a string view as immutable bytes.
std:: span<const char> nxt:: io:: as_chars(std:: span<const std:: byte> bytes) noexcept
#include <nxtio/buffers.hpp>
Reinterpret immutable bytes as chars.
std:: string_view nxt:: io:: as_string_view(std:: span<const std:: byte> bytes) noexcept
#include <nxtio/buffers.hpp>
View a byte span as immutable character data.
Reinterpret immutable bytes as a string view.
std:: span<char> nxt:: io:: as_writable_chars(std:: span<std:: byte> bytes) noexcept
#include <nxtio/buffers.hpp>
Reinterpret writable bytes as writable chars.