| library test.mixer; |
| |
| using zx; |
| |
| type ExampleFlexibleBits = flexible bits : uint8 { |
| B = 1; |
| }; |
| |
| type ExampleStrictBits = strict bits : uint8 { |
| B = 1; |
| }; |
| |
| type ExampleFlexibleEnum = flexible enum : uint8 { |
| E = 1; |
| }; |
| |
| type ExampleStrictEnum = strict enum : uint8 { |
| E = 1; |
| }; |
| |
| type ExampleStruct = struct { |
| s string; |
| }; |
| |
| type ExampleTable = table { |
| 1: s string; |
| }; |
| |
| type ExampleStrictUnion = strict union { |
| 1: s string; |
| }; |
| |
| type ExampleFlexibleUnion = flexible union { |
| 1: s string; |
| }; |
| |
| type ExampleHandleStruct = resource struct { |
| channel zx.Handle:<CHANNEL, zx.Rights.DUPLICATE>; |
| }; |
| |
| closed protocol Protocol {}; |
| |
| type ExampleEndpointStruct = resource struct { |
| client_end client_end:Protocol; |
| optional_client_end client_end:<Protocol, optional>; |
| server_end server_end:Protocol; |
| optional_server_end server_end:<Protocol, optional>; |
| }; |