boost::capy

Namespaces

Name

Description

test

this_coro

Namespace for coroutine environment accessors.

Types

Name

Description

any_executor

Forwards dispatch/`post`/`context` calls through a shared, type‐erased executor pointer.

any_read_stream

Dispatches read_some through a type‐erased vtable, using preallocated awaitable storage.

any_stream

Dispatches read_some and write_some through independent type‐erased vtables.

any_write_stream

Dispatches write_some through a type‐erased vtable, using preallocated awaitable storage.

async_event

Queues coroutines in wait() and resumes all of them when set() is called.

async_mutex

Queues coroutines in lock() and resumes exactly one when the mutex is free.

async_waker

A single‐slot waker that hands one wakeup to a waiting coroutine.

buffer_param

A buffer sequence wrapper providing windowed access.

buffer_param

A buffer sequence wrapper providing windowed access.

const_buffer

A reference to a contiguous region of read‐only memory.

const_buffer_archetype_

Satisfies ConstBufferSequence without being default‐constructible.

consuming_buffers

A cursor that drives consumption of a buffer sequence.

consuming_buffers

A cursor that drives consumption of a buffer sequence.

continuation

Pairs a coroutine handle with a scratch slot so executors can queue it without heap allocation.

execution_context

Registers, looks up, and shuts down service objects owned by a derived context.

executor_ref

Forwards dispatch/`post`/`context` calls through a non‐owning, type‐erased executor pointer.

frame_alloc_mixin

Mixin that adds frame‐allocator‐aware allocation to a promise type.

immediate

An awaitable that completes immediately with a value.

io_awaitable_promise_base

CRTP mixin that adds I/O awaitable support to a promise type.

io_env

Carries the executor, stop token, and frame allocator through a coroutine chain.

io_result

Bundles an error code with optional payload values, exposed via the tuple protocol.

mutable_buffer

A reference to a contiguous region of writable memory.

mutable_buffer_archetype_

Satisfies MutableBufferSequence without being default‐constructible.

quitter

Defers a coroutine body until awaited, then unwinds it early on a stop request.

recycling_memory_resource

Recycles freed blocks through per‐thread pools, with a shared pool for cross‐thread reuse.

run_async_wrapper

Installs the frame allocator, then starts the task on the executor when called once.

strand

Provides serialized coroutine execution for any executor type.

task

Defers a coroutine body until awaited, then runs it inline on the caller's thread.

thread_pool

Distributes posted work across a fixed group of worker threads via a shared queue.

work_guard

RAII guard that keeps an executor's context from completing.

Type Aliases

Name

Description

awaitable_result_t

Names what co_await a yields for awaitable type A.

buffer_type

Names mutable_buffer for a mutable sequence, const_buffer otherwise.

const_buffer_archetype

Falls back to const_buffer itself: const_buffer_archetype_ crashes clang.

const_buffer_param

Forces buffer_param to store windows as const_buffer, regardless of BS.

io_task

Names task<io_result<Ts...>>, whose co_return can convert an error code directly.

mutable_buffer_archetype

Falls back to mutable_buffer itself: mutable_buffer_archetype_ crashes clang.

slice_type

Names whichever buffer type buffer_slice returns for a sequence BS.

Enums

Name

Description

cond

Portable error conditions for capy I/O operations.

error

Error codes for capy I/O operations.

Functions

Name

Description

begin

begin overloads

buffer_copy

Copy the contents of a buffer sequence into another buffer sequence.

buffer_empty

Check if a buffer sequence contains no data.

buffer_length

Return the number of buffer elements in a sequence.

buffer_size

Return the total byte count across all buffers in a sequence.

buffer_slice

buffer_slice overloads

end

end overloads

front

front overloads

get

get overloads

get_current_frame_allocator

Return the current frame allocator for this thread.

get_recycling_memory_resource

Returns pointer to the default recycling memory resource.

get_system_context

Return the process‐wide system thread pool.

make_buffer

make_buffer overloads

make_error_code

Create an error_code from an error value.

make_error_condition

Create an error_condition from a cond value.

make_work_guard

Create a work guard from an executor.

read

Read data from a stream until the buffer sequence is full.

read_at_least

Read at least a minimum number of bytes from a stream.

ready

ready overloads

run

run overloads

run_async

run_async overloads

safe_resume

Resume a coroutine handle with frame‐allocator TLS protection.

set_current_frame_allocator

Set the current frame allocator for this thread.

set_current_thread_name

Set the name of the current thread for debugging purposes.

when_all

when_all overloads

when_any

when_any overloads

write

Write an entire buffer sequence to a stream.

write_at_least

Write at least a minimum number of bytes to a stream.

Concepts

Name

Description

ConstBufferSequence

Requires a type to convert to const_buffer, or be a range of such buffers.

ExecutionContext

Requires a type to expose a noexcept get_executor() bound to its own resources.

Executor

Requires a copyable type to dispatch or post continuations to its context.

IoAwaitable

Requires await_suspend to accept a coroutine handle and an io_env pointer.

IoAwaitableRange

Requires a sized input range whose value type satisfies IoAwaitable.

IoRunnable

Requires an IoAwaitable that exposes handle and release, and whose promise takes a continuation and an environment from outside a coroutine.

MutableBufferSequence

Requires a type to convert to mutable_buffer, or be a range of such buffers.

ReadStream

Requires read_some to return an IoAwaitable decomposing to an error code and a size.

Stream

Requires a type to satisfy both ReadStream and WriteStream.

WriteStream

Requires write_some to return an IoAwaitable decomposing to an error code and a size.

awaitable_decomposes_to

Requires an awaitable's result to destructure into the given types.

decomposes_to

Requires a type to destructure via structured bindings into the given types.

Created with MrDocs