oneof

Provide a discriminating union to be used inside a message buffer.

Members

Functions

get
const(SubType) get(T t)

Retrieve value with the given SubType from Oneof of type T.

has
bool has(T t)

Test if Oneof of type T stores a value with the given SubType.

Structs

Oneof
struct Oneof(Types...)

Create private anonymous union holding all requested types. This has probably a fair share of TODOs, e.g. it cannot hold multiple instances of the same type, the opEqual() is most likely sub-optimal, and probably a bunch of other things that I don't see as a D newbie.

Meta