![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <serialise.hh>
Public Member Functions | |
| FdSource (Descriptor fd) | |
| FdSource (FdSource &&)=default | |
| FdSource & | operator= (FdSource &&s)=default |
| FdSource (const FdSource &)=delete | |
| FdSource & | operator= (const FdSource &s)=delete |
| bool | good () override |
| void | restart () override |
| bool | hasData () |
| void | skip (size_t len) override |
| Public Member Functions inherited from nix::BufferedSource | |
| BufferedSource (size_t bufSize=32 *1024) | |
| size_t | read (char *data, size_t len) override |
| std::string | readLine (bool eofOk=false, char terminator='\n') |
| bool | hasData () |
| Public Member Functions inherited from nix::Source | |
| void | operator() (char *data, size_t len) |
| void | operator() (std::string_view data) |
| void | drainInto (Sink &sink) |
| virtual void | drainInto (Sink &sink, uint64_t len) |
| std::string | drain () |
Public Attributes | |
| Descriptor | fd |
| size_t | read = 0 |
| BackedStringView | endOfFileError {"unexpected end-of-file"} |
| bool | isSeekable = true |
| Public Attributes inherited from nix::BufferedSource | |
| size_t | bufSize |
| size_t | bufPosIn |
| size_t | bufPosOut |
| std::unique_ptr< char[]> | buffer |
Protected Member Functions | |
| size_t | readUnbuffered (char *data, size_t len) override |
A source that reads data from a file descriptor.
|
overridevirtual |
Reimplemented from nix::Source.
| bool nix::FdSource::hasData | ( | ) |
Return true if the buffer is not empty after a non-blocking read.
|
overrideprotectedvirtual |
Underlying read call, to be overridden.
Implements nix::BufferedSource.
|
overridevirtual |
Implements nix::RestartableSource.
|
overridevirtual |
Reimplemented from nix::Source.