boost::capy::io_result

Result type for asynchronous I/O operations.

Synopsis

Declared in <boost/capy/io_result.hpp>

template<class... Args>
struct io_result;

Description

This template provides a unified result type for async operations, always containing a std::error_code plus optional additional values. It supports structured bindings.

Usage

auto [ec, n] = co_await s.read_some(buf);
if (ec) { ... }

Non-Member Functions

Name

Description

ready

Create an immediate awaitable for a successful io_result with one value.

ready

Create an immediate awaitable for a successful io_result with three values.

ready

Create an immediate awaitable for a successful io_result with two values.

ready

Create an immediate awaitable for an io_result with error and three values.

ready

Create an immediate awaitable for an io_result with error and two values.

ready

Create an immediate awaitable for an io_result with error and one value.

Template Parameters

Name Description

Args

Additional value types beyond the error code.

Created with MrDocs