|
Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
|
#include <serialise.hh>
Public Member Functions | |
| void | operator() (char *data, size_t len) |
| virtual size_t | read (char *data, size_t len)=0 |
| virtual bool | good () |
| void | drainInto (Sink &sink) |
| std::string | drain () |
Abstract source of binary data.
| void nix::Source::operator() | ( | char * | data, |
| size_t | len ) |
Store exactly ‘len’ bytes in the buffer pointed to by ‘data’. It blocks until all the requested data is available, or throws an error if it is not going to be available.
|
pure virtual |
Store up to ‘len’ in the buffer pointed to by ‘data’, and return the number of bytes stored. It blocks until at least one byte is available.
Should not return 0 (generally you want to throw EndOfFile), but nothing stops that.
| EndOfFile | if there is no more data. |
Implemented in nix::ArchiveDecompressionSource, nix::BrotliDecompressionSource, nix::BufferedSource, nix::curlFileTransfer::TransferSource, nix::FramedSource, nix::GeneratorSource, nix::IndirectAsyncInputStreamToSource, nix::LambdaSource, nix::RewritingSource, nix::SizedSource, nix::StreamToSourceAdapter, nix::StringSource, and nix::TeeSource.