Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
length-prefixed-protocol-helper.hh File Reference
#include "nix/util/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, Compare > >
struct  nix::LengthPrefixedProtoHelper< Inner, std::tuple< Ts... > >
struct  nix::LengthPrefixedProtoHelper< Inner, std::map< K, V, Compare > >

Macros

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

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>; \
}