blob: c9b1fa4286f9071aec91d5592ed35789b0b3278f [file] [log] [blame]
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package fidl
// Enum is implemented by any value that is a FIDL enum.
//
// During code generation, `fidlgen_go` ensures that all domain types generated
// to represent FIDL enum implement this interface.
type Enum interface {
// IsUnknown indicates whether this enum value is unknown, i.e. whether it
// falls outside of known FIDL enum members.
//
// While strict FIDL enums ensure that no unknown enums can be decoded, it
// is still possible to construct an unknown enum by casting a primitive
// value.
IsUnknown() bool
}