Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
length-prefixed-protocol-helper.hh File Reference
#include "types.hh"

Go to the source code of this file.

Classes

struct  nix::LengthPrefixedProtoHelper< Inner, std::vector< T > >
 
struct  nix::LengthPrefixedProtoHelper< Inner, std::set< T > >
 
struct  nix::LengthPrefixedProtoHelper< Inner, std::tuple< Ts... > >
 
struct  nix::LengthPrefixedProtoHelper< Inner, std::map< K, V > >
 

Macros

#define LENGTH_PREFIXED_PROTO_HELPER(Inner, T)
 
#define LENGTH_PREFIXED_PROTO_HELPER_X   std::map<K, V>
 

Detailed Description

Reusable serialisers for serialization container types in a length-prefixed manner.

Used by both the Worker and Serve protocols.

Macro Definition Documentation

◆ LENGTH_PREFIXED_PROTO_HELPER

#define LENGTH_PREFIXED_PROTO_HELPER ( Inner,
T )
Value:
struct LengthPrefixedProtoHelper< Inner, T > \
{ \
static T read(const StoreDirConfig & store, typename Inner::ReadConn conn); \
static void write(const StoreDirConfig & store, typename Inner::WriteConn conn, const T & str); \
private: \ \
template<typename U> using S = typename Inner::template Serialise<U>; \
}
ChunkedVector< std::string, 8192 > store
Definition lexer.l:1011
std::ostream & str
Definition lexer.l:1728
T Inner
Definition lexer.l:4920