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

#include <file-descriptor.hh>

Public Attributes

std::make_unsigned_t< off_t > size = 0
bool expected = false
bool block = true

Detailed Description

Options for draining a file descriptor to a string.

Member Data Documentation

◆ block

bool nix::DrainFdOpts::block = true

Whether to block on read.

◆ expected

bool nix::DrainFdOpts::expected = false

If true, size is exact expected size. If false, size is just a reservation hint.

◆ size

std::make_unsigned_t<off_t> nix::DrainFdOpts::size = 0

If expected=true: read exactly this many bytes (throws EndOfFile if EOF occurs before reading all bytes). If expected=false: size hint for string allocation.


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