| // WARNING: This file is machine generated by fidlgen. |
| |
| package name |
| |
| |
| |
| |
| |
| type UnionTag uint32 |
| const ( |
| _ UnionTag = iota |
| UnionPrimitive |
| UnionStringNeedsConstructor |
| UnionVectorStringAlsoNeedsConstructor |
| ) |
| |
| |
| type Union struct { |
| UnionTag `fidl:"tag" fidl2:"u,24,8"` |
| Primitive int32 |
| StringNeedsConstructor string |
| VectorStringAlsoNeedsConstructor []string |
| } |
| |
| // Implements Payload. |
| func (_ *Union) InlineAlignment() int { |
| return 8 |
| } |
| |
| // Implements Payload. |
| func (_ *Union) InlineSize() int { |
| return 24 |
| } |
| |
| func (u *Union) Which() UnionTag { |
| return u.UnionTag |
| } |
| |
| func (u *Union) SetPrimitive(primitive int32) { |
| u.UnionTag = UnionPrimitive |
| u.Primitive = primitive |
| } |
| |
| func (u *Union) SetStringNeedsConstructor(stringNeedsConstructor string) { |
| u.UnionTag = UnionStringNeedsConstructor |
| u.StringNeedsConstructor = stringNeedsConstructor |
| } |
| |
| func (u *Union) SetVectorStringAlsoNeedsConstructor(vectorStringAlsoNeedsConstructor []string) { |
| u.UnionTag = UnionVectorStringAlsoNeedsConstructor |
| u.VectorStringAlsoNeedsConstructor = vectorStringAlsoNeedsConstructor |
| } |