boost::capy::push_to

push_to overloads

Synopses

Transfer data from a BufferSource to a WriteSink.

template<
    BufferSource Src,
    WriteSink Sink>
io_task<std::size_t>
push_to(
    Src& source,
    Sink& sink);

Transfer data from a BufferSource to a WriteStream.

template<
    BufferSource Src,
    WriteStream Stream>
requires (!WriteSink<Stream>)
io_task<std::size_t>
push_to(
    Src& source,
    Stream& stream);

Return Value

A task that yields (std::error_code, std::size_t). On success, ec is default‐constructed (no error) and n is the total number of bytes transferred. On error, ec contains the error code and n is the total number of bytes transferred before the error.

Template Parameters

Name Description

Src

The source type, must satisfy BufferSource.

Sink

The sink type, must satisfy WriteSink.

Stream

The stream type, must satisfy WriteStream.

Parameters

Name Description

source

The source to pull data from.

sink

The sink to write data to.

stream

The stream to write data to.

See Also

BufferSource, WriteSink

BufferSource, WriteStream, pull_from

Created with MrDocs