Bitcoin Core 31.99.0
P2P Digital Currency
Static Public Attributes | List of all members
mp::Accessor< Field, flags > Struct Template Reference

Accessor type holding flags that determine how to access a message field. More...

#include <proxy.h>

Inheritance diagram for mp::Accessor< Field, flags >:
[legend]
Collaboration diagram for mp::Accessor< Field, flags >:
[legend]

Static Public Attributes

static const bool in = flags & FIELD_IN
 Field is present from the Cap'n Proto Params struct (client -> server). More...
 
static const bool out = flags & FIELD_OUT
 Field is present from the Cap'n Proto Results struct (server -> client). More...
 
static const bool optional = flags & FIELD_OPTIONAL
 Field has a companion has{Name} boolean field in the Cap'n Proto struct. More...
 
static const bool requested = flags & FIELD_REQUESTED
 Results field has a companion want{Name} boolean field in the Params struct. More...
 
static const bool boxed = flags & FIELD_BOXED
 Field is a Cap'n Proto pointer type (struct, list, text, data, interface) as opposed to a primitive type (bool, int, float, enum). More...
 

Additional Inherited Members

- Public Attributes inherited from Field
::capnp::StructSchema::Field param
 
bool param_is_set = false
 
::capnp::StructSchema::Field result
 
bool result_is_set = false
 
int args = 0
 
bool retval = false
 
bool optional = false
 
bool requested = false
 
bool skip = false
 
kj::StringPtr exception
 

Detailed Description

template<typename Field, int flags>
struct mp::Accessor< Field, flags >

Accessor type holding flags that determine how to access a message field.

Definition at line 315 of file proxy.h.

Member Data Documentation

◆ boxed

template<typename Field , int flags>
const bool mp::Accessor< Field, flags >::boxed = flags & FIELD_BOXED
static

Field is a Cap'n Proto pointer type (struct, list, text, data, interface) as opposed to a primitive type (bool, int, float, enum).

Definition at line 332 of file proxy.h.

◆ in

template<typename Field , int flags>
const bool mp::Accessor< Field, flags >::in = flags & FIELD_IN
static

Field is present from the Cap'n Proto Params struct (client -> server).

Definition at line 318 of file proxy.h.

◆ optional

template<typename Field , int flags>
const bool mp::Accessor< Field, flags >::optional = flags & FIELD_OPTIONAL
static

Field has a companion has{Name} boolean field in the Cap'n Proto struct.

This is used to represent optional primitive values (e.g. C++ std::optional<int>) because Cap'n Proto doesn't allow primitive fields to be unset.

Definition at line 325 of file proxy.h.

◆ out

template<typename Field , int flags>
const bool mp::Accessor< Field, flags >::out = flags & FIELD_OUT
static

Field is present from the Cap'n Proto Results struct (server -> client).

Definition at line 320 of file proxy.h.

◆ requested

template<typename Field , int flags>
const bool mp::Accessor< Field, flags >::requested = flags & FIELD_REQUESTED
static

Results field has a companion want{Name} boolean field in the Params struct.

Used for optional output parameters (e.g. C++ int*) and set to true if the caller passed a non-null pointer and wants the result.

Definition at line 329 of file proxy.h.


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