boost::capy::push_to
push_to overloads
Synopses
Declared in <boost/capy/io/push_to.hpp>
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 |
Sink |
The sink type, must satisfy |
Stream |
The stream type, must satisfy |
Parameters
| Name | Description |
|---|---|
source |
The source to pull data from. |
sink |
The sink to write data to. |
stream |
The stream to write data to. |