Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::ChainSource Struct Reference

#include <serialise.hh>

Inheritance diagram for nix::ChainSource:
nix::Source

Public Member Functions

 ChainSource (Source &s1, Source &s2)
 
size_t read (char *data, size_t len) override
 
- Public Member Functions inherited from nix::Source
void operator() (char *data, size_t len)
 
void operator() (std::string_view data)
 
virtual bool good ()
 
void drainInto (Sink &sink)
 
std::string drain ()
 

Public Attributes

Sourcesource1
 
Sourcesource2
 
bool useSecond = false
 

Detailed Description

Chain two sources together so after the first is exhausted, the second is used

Member Function Documentation

◆ read()

size_t nix::ChainSource::read ( char * data,
size_t len )
overridevirtual

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.

Implements nix::Source.


The documentation for this struct was generated from the following files: