Bitcoin Core 32.99.0
P2P Digital Currency
Loading...
Searching...
No Matches
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 constexpr bool in = (flags & FIELD_IN) != 0
 Field is present from the Cap'n Proto Params struct (client -> server).
 
static constexpr bool out = (flags & FIELD_OUT) != 0
 Field is present from the Cap'n Proto Results struct (server -> client).
 
static constexpr bool optional = (flags & FIELD_OPTIONAL) != 0
 Field has a companion has{Name} boolean field in the Cap'n Proto struct.
 
static constexpr bool requested = (flags & FIELD_REQUESTED) != 0
 Results field has a companion want{Name} boolean field in the Params struct.
 
static constexpr bool boxed = (flags & FIELD_BOXED) != 0
 Field is a Cap'n Proto pointer type (struct, list, text, data, interface) as opposed to a primitive type (bool, int, float, enum).
 

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 317 of file proxy.h.

Member Data Documentation

◆ boxed

template<typename Field , int flags>
constexpr bool mp::Accessor< Field, flags >::boxed = (flags & FIELD_BOXED) != 0
staticconstexpr

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 334 of file proxy.h.

◆ in

template<typename Field , int flags>
constexpr bool mp::Accessor< Field, flags >::in = (flags & FIELD_IN) != 0
staticconstexpr

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

Definition at line 320 of file proxy.h.

◆ optional

template<typename Field , int flags>
constexpr bool mp::Accessor< Field, flags >::optional = (flags & FIELD_OPTIONAL) != 0
staticconstexpr

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 327 of file proxy.h.

◆ out

template<typename Field , int flags>
constexpr bool mp::Accessor< Field, flags >::out = (flags & FIELD_OUT) != 0
staticconstexpr

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

Definition at line 322 of file proxy.h.

◆ requested

template<typename Field , int flags>
constexpr bool mp::Accessor< Field, flags >::requested = (flags & FIELD_REQUESTED) != 0
staticconstexpr

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 331 of file proxy.h.


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