| <link rel="stylesheet" href="../style.css" /> |
| |
| [TOC] |
| # test.union |
| |
| |
| |
| ## **PROTOCOLS** |
| |
| ## TestProtocol {#TestProtocol} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=119)* |
| |
| |
| ### FlexibleUnionHenceResponseMustBeHeapAllocated {#TestProtocol.FlexibleUnionHenceResponseMustBeHeapAllocated} |
| |
| |
| |
| |
| #### Request {#TestProtocol.FlexibleUnionHenceResponseMustBeHeapAllocated_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#TestProtocol.FlexibleUnionHenceResponseMustBeHeapAllocated_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>xu</code></td> |
| <td> |
| <code><a class='link' href='#OlderSimpleUnion'>OlderSimpleUnion</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### StrictUnionHenceResponseMayBeStackAllocated {#TestProtocol.StrictUnionHenceResponseMayBeStackAllocated} |
| |
| |
| |
| |
| #### Request {#TestProtocol.StrictUnionHenceResponseMayBeStackAllocated_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#TestProtocol.StrictUnionHenceResponseMayBeStackAllocated_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>xu</code></td> |
| <td> |
| <code><a class='link' href='#StrictBoundedUnion'>StrictBoundedUnion</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **STRUCTS** |
| |
| ### Empty {#Empty data-text="Empty"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=108)* |
| |
| <EMPTY> |
| |
| ### NullableUnionStruct {#NullableUnionStruct data-text="NullableUnionStruct"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=63)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="NullableUnionStruct.the_union"> |
| <td><code>the_union</code></td> |
| <td> |
| <code><a class='link' href='#Union'>Union</a>?</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### Pasta {#Pasta data-text="Pasta"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=7)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="Pasta.sauce"> |
| <td><code>sauce</code></td> |
| <td> |
| <code>string[16]</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### Pizza {#Pizza data-text="Pizza"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=3)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="Pizza.toppings"> |
| <td><code>toppings</code></td> |
| <td> |
| <code>vector<string></code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### StructWithNullableUnion {#StructWithNullableUnion data-text="StructWithNullableUnion"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=128)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="StructWithNullableUnion.x1"> |
| <td><code>x1</code></td> |
| <td> |
| <code><a class='link' href='#OlderSimpleUnion'>OlderSimpleUnion</a>?</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### UnionSandwich {#UnionSandwich data-text="UnionSandwich"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=137)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="UnionSandwich.a"> |
| <td><code>a</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| <tr id="UnionSandwich.u"> |
| <td><code>u</code></td> |
| <td> |
| <code><a class='link' href='#ExplicitFlexibleUnion'>ExplicitFlexibleUnion</a></code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| <tr id="UnionSandwich.b"> |
| <td><code>b</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| |
| |
| |
| ## **UNIONS** |
| |
| ### EmptyFlexibleUnion [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#EmptyFlexibleUnion data-text="EmptyFlexibleUnion"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=151)* |
| |
| ### ExplicitFlexibleUnion [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ExplicitFlexibleUnion data-text="ExplicitFlexibleUnion"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=132)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="ExplicitFlexibleUnion.i"> |
| <td><h3 id="ExplicitFlexibleUnion.i" class="add-link hide-from-toc">1</h3></td> |
| <td><code>i</code></td> |
| <td> |
| <code>int64</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="ExplicitFlexibleUnion.f"> |
| <td><h3 id="ExplicitFlexibleUnion.f" class="add-link hide-from-toc">4</h3></td> |
| <td><code>f</code></td> |
| <td> |
| <code>float32</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### ExplicitFoo [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ExplicitFoo data-text="ExplicitFoo"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=77)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="ExplicitFoo.i"> |
| <td><h3 id="ExplicitFoo.i" class="add-link hide-from-toc">1</h3></td> |
| <td><code>i</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="ExplicitFoo.s"> |
| <td><h3 id="ExplicitFoo.s" class="add-link hide-from-toc">2</h3></td> |
| <td><code>s</code></td> |
| <td> |
| <code>string</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### ExplicitPizzaOrPasta [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ExplicitPizzaOrPasta data-text="ExplicitPizzaOrPasta"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=16)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="ExplicitPizzaOrPasta.pizza"> |
| <td><h3 id="ExplicitPizzaOrPasta.pizza" class="add-link hide-from-toc">1</h3></td> |
| <td><code>pizza</code></td> |
| <td> |
| <code><a class='link' href='#Pizza'>Pizza</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="ExplicitPizzaOrPasta.pasta"> |
| <td><h3 id="ExplicitPizzaOrPasta.pasta" class="add-link hide-from-toc">4</h3></td> |
| <td><code>pasta</code></td> |
| <td> |
| <code><a class='link' href='#Pasta'>Pasta</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### ExplicitStrictFoo [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ExplicitStrictFoo data-text="ExplicitStrictFoo"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=82)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="ExplicitStrictFoo.i"> |
| <td><h3 id="ExplicitStrictFoo.i" class="add-link hide-from-toc">2</h3></td> |
| <td><code>i</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="ExplicitStrictFoo.s"> |
| <td><h3 id="ExplicitStrictFoo.s" class="add-link hide-from-toc">3</h3></td> |
| <td><code>s</code></td> |
| <td> |
| <code>string</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### ExplicitUnion [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ExplicitUnion data-text="ExplicitUnion"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=53)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="ExplicitUnion.Primitive"> |
| <td><h3 id="ExplicitUnion.Primitive" class="add-link hide-from-toc">1</h3></td> |
| <td><code>Primitive</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="ExplicitUnion.StringNeedsConstructor"> |
| <td><h3 id="ExplicitUnion.StringNeedsConstructor" class="add-link hide-from-toc">3</h3></td> |
| <td><code>StringNeedsConstructor</code></td> |
| <td> |
| <code>string</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### FieldCollision [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#FieldCollision data-text="FieldCollision"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=49)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="FieldCollision.field_collision_tag"> |
| <td><h3 id="FieldCollision.field_collision_tag" class="add-link hide-from-toc">1</h3></td> |
| <td><code>field_collision_tag</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### FlexibleFoo [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#FlexibleFoo data-text="FlexibleFoo"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=67)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="FlexibleFoo.s"> |
| <td><h3 id="FlexibleFoo.s" class="add-link hide-from-toc">1</h3></td> |
| <td><code>s</code></td> |
| <td> |
| <code>string</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="FlexibleFoo.i"> |
| <td><h3 id="FlexibleFoo.i" class="add-link hide-from-toc">2</h3></td> |
| <td><code>i</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### FlexiblePizzaOrPasta [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#FlexiblePizzaOrPasta data-text="FlexiblePizzaOrPasta"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=21)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="FlexiblePizzaOrPasta.pizza"> |
| <td><h3 id="FlexiblePizzaOrPasta.pizza" class="add-link hide-from-toc">1</h3></td> |
| <td><code>pizza</code></td> |
| <td> |
| <code><a class='link' href='#Pizza'>Pizza</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="FlexiblePizzaOrPasta.pasta"> |
| <td><h3 id="FlexiblePizzaOrPasta.pasta" class="add-link hide-from-toc">2</h3></td> |
| <td><code>pasta</code></td> |
| <td> |
| <code><a class='link' href='#Pasta'>Pasta</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### FlexibleUnion [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#FlexibleUnion data-text="FlexibleUnion"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=37)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="FlexibleUnion.Primitive"> |
| <td><h3 id="FlexibleUnion.Primitive" class="add-link hide-from-toc">1</h3></td> |
| <td><code>Primitive</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="FlexibleUnion.StringNeedsConstructor"> |
| <td><h3 id="FlexibleUnion.StringNeedsConstructor" class="add-link hide-from-toc">2</h3></td> |
| <td><code>StringNeedsConstructor</code></td> |
| <td> |
| <code>string</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="FlexibleUnion.VectorStringAlsoNeedsConstructor"> |
| <td><h3 id="FlexibleUnion.VectorStringAlsoNeedsConstructor" class="add-link hide-from-toc">3</h3></td> |
| <td><code>VectorStringAlsoNeedsConstructor</code></td> |
| <td> |
| <code>vector<string></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### NewerSimpleUnion [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#NewerSimpleUnion data-text="NewerSimpleUnion"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=92)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="NewerSimpleUnion.i"> |
| <td><h3 id="NewerSimpleUnion.i" class="add-link hide-from-toc">1</h3></td> |
| <td><code>i</code></td> |
| <td> |
| <code>int64</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="NewerSimpleUnion.s"> |
| <td><h3 id="NewerSimpleUnion.s" class="add-link hide-from-toc">2</h3></td> |
| <td><code>s</code></td> |
| <td> |
| <code>string</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="NewerSimpleUnion.v"> |
| <td><h3 id="NewerSimpleUnion.v" class="add-link hide-from-toc">3</h3></td> |
| <td><code>v</code></td> |
| <td> |
| <code>vector<string></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### OlderSimpleUnion [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#OlderSimpleUnion data-text="OlderSimpleUnion"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=87)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="OlderSimpleUnion.i"> |
| <td><h3 id="OlderSimpleUnion.i" class="add-link hide-from-toc">1</h3></td> |
| <td><code>i</code></td> |
| <td> |
| <code>int64</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="OlderSimpleUnion.f"> |
| <td><h3 id="OlderSimpleUnion.f" class="add-link hide-from-toc">2</h3></td> |
| <td><code>f</code></td> |
| <td> |
| <code>float32</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### PizzaOrPasta [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#PizzaOrPasta data-text="PizzaOrPasta"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=11)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="PizzaOrPasta.pizza"> |
| <td><h3 id="PizzaOrPasta.pizza" class="add-link hide-from-toc">1</h3></td> |
| <td><code>pizza</code></td> |
| <td> |
| <code><a class='link' href='#Pizza'>Pizza</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="PizzaOrPasta.pasta"> |
| <td><h3 id="PizzaOrPasta.pasta" class="add-link hide-from-toc">2</h3></td> |
| <td><code>pasta</code></td> |
| <td> |
| <code><a class='link' href='#Pasta'>Pasta</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### ReverseOrdinalUnion [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ReverseOrdinalUnion data-text="ReverseOrdinalUnion"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=58)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="ReverseOrdinalUnion.first"> |
| <td><h3 id="ReverseOrdinalUnion.first" class="add-link hide-from-toc">1</h3></td> |
| <td><code>first</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="ReverseOrdinalUnion.second"> |
| <td><h3 id="ReverseOrdinalUnion.second" class="add-link hide-from-toc">2</h3></td> |
| <td><code>second</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### StrictBoundedUnion [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#StrictBoundedUnion data-text="StrictBoundedUnion"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=115)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="StrictBoundedUnion.v"> |
| <td><h3 id="StrictBoundedUnion.v" class="add-link hide-from-toc">1</h3></td> |
| <td><code>v</code></td> |
| <td> |
| <code>vector<uint8>[10]</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### StrictFoo [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#StrictFoo data-text="StrictFoo"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=72)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="StrictFoo.s"> |
| <td><h3 id="StrictFoo.s" class="add-link hide-from-toc">1</h3></td> |
| <td><code>s</code></td> |
| <td> |
| <code>string</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="StrictFoo.i"> |
| <td><h3 id="StrictFoo.i" class="add-link hide-from-toc">2</h3></td> |
| <td><code>i</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### StrictPizzaOrPasta [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#StrictPizzaOrPasta data-text="StrictPizzaOrPasta"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=26)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="StrictPizzaOrPasta.pizza"> |
| <td><h3 id="StrictPizzaOrPasta.pizza" class="add-link hide-from-toc">1</h3></td> |
| <td><code>pizza</code></td> |
| <td> |
| <code><a class='link' href='#Pizza'>Pizza</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="StrictPizzaOrPasta.pasta"> |
| <td><h3 id="StrictPizzaOrPasta.pasta" class="add-link hide-from-toc">2</h3></td> |
| <td><code>pasta</code></td> |
| <td> |
| <code><a class='link' href='#Pasta'>Pasta</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### StrictSimpleUnion [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#StrictSimpleUnion data-text="StrictSimpleUnion"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=102)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="StrictSimpleUnion.i"> |
| <td><h3 id="StrictSimpleUnion.i" class="add-link hide-from-toc">1</h3></td> |
| <td><code>i</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="StrictSimpleUnion.f"> |
| <td><h3 id="StrictSimpleUnion.f" class="add-link hide-from-toc">2</h3></td> |
| <td><code>f</code></td> |
| <td> |
| <code>float32</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="StrictSimpleUnion.s"> |
| <td><h3 id="StrictSimpleUnion.s" class="add-link hide-from-toc">3</h3></td> |
| <td><code>s</code></td> |
| <td> |
| <code>string</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### StrictUnion [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#StrictUnion data-text="StrictUnion"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=43)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="StrictUnion.Primitive"> |
| <td><h3 id="StrictUnion.Primitive" class="add-link hide-from-toc">1</h3></td> |
| <td><code>Primitive</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="StrictUnion.StringNeedsConstructor"> |
| <td><h3 id="StrictUnion.StringNeedsConstructor" class="add-link hide-from-toc">2</h3></td> |
| <td><code>StringNeedsConstructor</code></td> |
| <td> |
| <code>string</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="StrictUnion.VectorStringAlsoNeedsConstructor"> |
| <td><h3 id="StrictUnion.VectorStringAlsoNeedsConstructor" class="add-link hide-from-toc">3</h3></td> |
| <td><code>VectorStringAlsoNeedsConstructor</code></td> |
| <td> |
| <code>vector<string></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### Union [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Union data-text="Union"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=31)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="Union.Primitive"> |
| <td><h3 id="Union.Primitive" class="add-link hide-from-toc">1</h3></td> |
| <td><code>Primitive</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="Union.StringNeedsConstructor"> |
| <td><h3 id="Union.StringNeedsConstructor" class="add-link hide-from-toc">2</h3></td> |
| <td><code>StringNeedsConstructor</code></td> |
| <td> |
| <code>string</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="Union.VectorStringAlsoNeedsConstructor"> |
| <td><h3 id="Union.VectorStringAlsoNeedsConstructor" class="add-link hide-from-toc">3</h3></td> |
| <td><code>VectorStringAlsoNeedsConstructor</code></td> |
| <td> |
| <code>vector<string></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### UnionContainingEmptyStruct [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#UnionContainingEmptyStruct data-text="UnionContainingEmptyStruct"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=110)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="UnionContainingEmptyStruct.empty"> |
| <td><h3 id="UnionContainingEmptyStruct.empty" class="add-link hide-from-toc">1</h3></td> |
| <td><code>empty</code></td> |
| <td> |
| <code><a class='link' href='#Empty'>Empty</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### UnionWithAttributes [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#UnionWithAttributes data-text="UnionWithAttributes"} |
| *Defined in [test.union/union.test.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/fidl/fidlc/testdata/union.test.fidl;l=144)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="UnionWithAttributes.x"> |
| <td><h3 id="UnionWithAttributes.x" class="add-link hide-from-toc">1</h3></td> |
| <td><code>x</code></td> |
| <td> |
| <code>int64</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| |
| |