- isSetbool isSet() 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- opEqualsbool opEquals(Object other) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- opEqualsbool opEquals(This other) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- readvoid read(Protocol proto) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- setvoid set(MemberType!(This, fieldName) value) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- toHashsize_t toHash() 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- toHashsize_t toHash() 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- toStringstring toString() 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- toStringstring toString() 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- unsetvoid unset() 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- writevoid write(Protocol proto) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
Mixin template defining additional helper methods for using a struct with Thrift, and a member called isSetFlags if the struct contains any fields for which an »is set« flag is needed.
It can only be used inside structs or Exception classes.
For example, consider the following struct definition:
TStructHelper adds the following methods to the struct:
Additionally, an opEquals() implementation is provided which simply compares all fields, but disregards the is set struct, if any (the exact signature obviously differs between structs and exception classes). The metadata is stored in a manifest constant called fieldMeta.
Note: To set the default values for fields where one has been specified in the field metadata, a parameterless static opCall is generated, because D does not allow parameterless (default) constructors for structs. Thus, be always to use to initialize structs: