Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
file-descriptor-private.hh
1
#pragma once
2
3
#include "
nix/util/file-descriptor.hh
"
4
#include "
nix/util/result.hh
"
5
#include "
nix/util/system-error.hh
"
6
7
namespace
nix {
8
9
struct
FdSink
;
10
23
bool
tryCopyFdRangeFast(
Descriptor
from,
Descriptor
to, off_t offset,
size_t
nbytes,
size_t
& written);
24
30
inline
Result<AutoCloseFD, NativeError>
openResult(
Descriptor
fd)
31
{
32
if
(fd == INVALID_DESCRIPTOR)
33
return
outcome::failure(
NativeSysError::ambientError
());
34
return
outcome::success(
AutoCloseFD
{fd});
35
}
36
37
}
// namespace nix
nix::AutoCloseFD
Definition
file-descriptor.hh:265
file-descriptor.hh
File descriptor operations for almost arbitrary file descriptors.
nix::Descriptor
int Descriptor
Definition
file-descriptor.hh:36
result.hh
nix::Result
outcome::unchecked< T, E > Result
Definition
result.hh:24
nix::FdSink
Definition
serialise.hh:194
nix::SysErrorFields::ambientError
static int ambientError()
Definition
system-error.hh:244
system-error.hh
Errors from the operating system: SystemError, and its subclasses for the native error codes,...
libutil
file-descriptor-private.hh
Generated by
1.18.0