Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::RewritingSource Struct Reference
Inheritance diagram for nix::RewritingSource:
nix::Source

Classes

struct  may_change_size_t

Public Member Functions

 RewritingSource (const std::string &from, const std::string &to, Source &inner)
 RewritingSource (StringMap rewrites, Source &inner)
 RewritingSource (may_change_size_t, StringMap rewrites, Source &inner)
size_t read (char *data, size_t len) override
Public Member Functions inherited from nix::Source
void operator() (char *data, size_t len)
virtual bool good ()
void drainInto (Sink &sink)
std::string drain ()

Public Attributes

const std::string::size_type maxRewriteSize
const std::string initials
const StringMap rewrites
std::string rewritten
std::string buffered
std::string_view unreturned
Sourceinner

Static Public Attributes

static constexpr struct nix::RewritingSource::may_change_size_t may_change_size

Member Function Documentation

◆ read()

size_t nix::RewritingSource::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.

Should not return 0 (generally you want to throw EndOfFile), but nothing stops that.

Exceptions
EndOfFileif there is no more data.

Implements nix::Source.


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