- isSet
bool isSet()
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(Object other)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(This other)
Undocumented in source. Be warned that the author may not have intended to support it.
- read
void read(Protocol proto)
Undocumented in source. Be warned that the author may not have intended to support it.
- set
void set(MemberType!(This, fieldName) value)
Undocumented in source. Be warned that the author may not have intended to support it.
- toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.
- toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.
- toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
- toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
- unset
void unset()
Undocumented in source. Be warned that the author may not have intended to support it.
- write
void 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: