blob: b1fdff5f3246aba8c9200525a07eb75df8bfe788 [file] [log] [blame]
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fidl.rust.test.external;
type StrictButtons = strict bits : uint32 {
PLAY = 0b001;
PAUSE = 0b010;
STOP = 0b100;
};
type FlexibleButtons = flexible bits : uint32 {
PLAY = 0b001;
PAUSE = 0b010;
STOP = 0b100;
};
type StrictAnimal = strict enum : int32 {
DOG = 0;
CAT = 1;
FROG = 2;
};
type FlexibleAnimal = flexible enum : int32 {
DOG = 0;
CAT = 1;
FROG = 2;
};
type FlexibleEmptyEnum = flexible enum : int32 {};
type Coordinate = struct {
x uint8;
y uint8;
};
type StrictValueThing = strict union {
1: number uint32;
2: name string;
};
type FlexibleValueThing = flexible union {
1: number uint32;
2: name string;
};
type StrictResourceThing = strict resource union {
1: number uint32;
2: name string;
};
type FlexibleResourceThing = flexible resource union {
1: number uint32;
2: name string;
};
type ValueRecord = table {
1: name string;
2: age uint8;
};
type ResourceRecord = resource table {
1: name string;
2: age uint8;
};