parcel 0.2.2
Wrappable, wire-transferable C++23 value system with JSON serialization
Loading...
Searching...
No Matches
parcel::IFieldDescriptor Struct Referenceabstract

Runtime descriptor for a single struct field. More...

#include <descriptor.h>

Inheritance diagram for parcel::IFieldDescriptor:

Public Member Functions

virtual std::string_view key () const =0
 JSON key under which this field appears in "v".
 
virtual std::string_view kind () const =0
 Cell kind id for the field's value type.
 
virtual DisplayInfo display_info () const =0
 Display info for this field.
 
virtual bool is_required () const =0
 Whether the field must be present on deserialization.
 
virtual json_t to_json () const =0
 Serialize the field descriptor itself.
 

Detailed Description

Runtime descriptor for a single struct field.

See also
StructCell — host that aggregates field descriptors.

Member Function Documentation

◆ to_json()

virtual json_t parcel::IFieldDescriptor::to_json ( ) const
pure virtual

Serialize the field descriptor itself.

Returns
JSON object with key, kind, display_info, required.

Implemented in parcel::MemberFieldDescriptor< Payload, FieldT, CellT >, and parcel::InheritedFieldDescriptor< DerivedPayload, ParentPayload >.


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