blob: 9b3f516997fc059235f6bde44a48a6680095efa3 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
package consts
import (
zx "fidl/zx"
_strings "strings"
_bindings "syscall/zx/fidl"
)
const (
Answer uint16 = 42
AnswerInBinary uint16 = 42
AnswerNarrowed uint8 = Answer
ConversionFactor float64 = 1.41421
Diamond uint64 = 1746410393481133080
EnabledFlag bool = true
Fuchsia uint64 = 4054509061583223046
MinTemp float32 = -273.15
Offset int8 = -33
PopulationUsa2018 uint32 = 330000000
Username string = "\"squeenze\""
ZxConst uint64 = zx.ChannelMaxMsgBytes
ZxObjVal zx.ObjType = zx.ObjTypeChannel
ZxRightsVal zx.Rights = zx.RightsRead
BitsPrimitiveTrue uint32 = BitsTypeTrue
BitsPrimitiveVal uint32 = BitsTypeValue
BitsPrimitiveValNarrowed uint8 = BitsTypeValue
BitsTrue BitsType = BitsTypeTrue
BitsVal BitsType = BitsTypeValue
EnumPrimitiveTrue int32 = EnumTypeTrue
EnumPrimitiveVal int32 = EnumTypeValue
EnumPrimitiveValNarrowed int8 = EnumTypeValue
EnumTrue EnumType = EnumTypeTrue
EnumVal EnumType = EnumTypeValue
)
var _ _bindings.Enum = EnumType(0)
type EnumType int32
const (
EnumTypeValue EnumType = 1
EnumTypeTrue EnumType = 2
)
func (_ EnumType) I_EnumValues() []EnumType {
return []EnumType{
EnumTypeValue,
EnumTypeTrue,
}
}
func (_ EnumType) I_EnumIsStrict() bool {
return true
}
func (x EnumType) IsUnknown() bool {
switch x {
case 1:
return false
case 2:
return false
}
return true
}
func (x EnumType) String() string {
switch x {
case 1:
return "Value"
case 2:
return "True"
}
return "Unknown"
}
var _ _bindings.Bits = BitsType(0)
type BitsType uint32
const (
BitsTypeValue BitsType = 1
BitsTypeTrue BitsType = 2
BitsType_Mask BitsType = 3
)
func (_ BitsType) I_BitsMask() BitsType {
return BitsType_Mask
}
func (_ BitsType) I_BitsIsStrict() bool {
return true
}
func (x BitsType) HasUnknownBits() bool {
return x.GetUnknownBits() != 0
}
func (x BitsType) GetUnknownBits() uint64 {
return uint64(^BitsType_Mask & x)
}
func (x BitsType) InvertBits() BitsType {
return BitsType_Mask & ^x
}
// HasBits validates that all flipped bits in the mask are set.
func (x BitsType) HasBits(mask BitsType) bool {
return mask|x == x
}
// ClearBits ensures all flipped bits in the mask are unset.
func (x BitsType) ClearBits(mask BitsType) BitsType {
return ^mask & x
}
func (x BitsType) String() string {
var buf _strings.Builder
if 1&x != 0 {
if buf.Len() != 0 {
buf.WriteRune('|')
}
buf.WriteString("Value")
}
if 2&x != 0 {
if buf.Len() != 0 {
buf.WriteRune('|')
}
buf.WriteString("True")
}
if buf.Len() == 0 {
buf.WriteString("<empty bits>")
}
return buf.String()
}