codegen

package
v0.0.0-...-8023e94 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2021 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bits

type Bits struct {
	fidl.Bits
	Name    string
	Type    string
	Members []BitsMember
}

type BitsMember

type BitsMember struct {
	fidl.BitsMember
	Name  string
	Value string
}

type Const

type Const struct {
	fidl.Attributes
	Name  string
	Type  string
	Value string
}

type EncodedCompoundIdentifier

type EncodedCompoundIdentifier = fidl.EncodedCompoundIdentifier

type Enum

type Enum struct {
	fidl.Enum
	Name    string
	Type    string
	Members []EnumMember
}

type EnumMember

type EnumMember struct {
	fidl.EnumMember
	Name  string
	Value string
}

type FieldHandleInformation

type FieldHandleInformation struct {
	// contains filtered or unexported fields
}

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator() *Generator

func (*Generator) GenerateFidl

func (gen *Generator) GenerateFidl(ir fidl.Root, outputFilename, rustfmtPath, rustfmtConfigPath string) error

func (*Generator) GenerateImpl

func (gen *Generator) GenerateImpl(wr io.Writer, tree Root) error

type HandleMetadataWrapper

type HandleMetadataWrapper struct {
	Name    string
	Subtype string
	Rights  string
}

type Method

type Method struct {
	fidl.Attributes
	Ordinal        uint64
	Name           string
	CamelName      string
	HasRequest     bool
	Request        []Parameter
	HasResponse    bool
	Response       []Parameter
	Result         *Result
	IsTransitional bool
}

type PaddingMarker

type PaddingMarker struct {
	Type   string
	Offset int
	// Mask is a string so it can be in hex.
	Mask string
}

type Parameter

type Parameter struct {
	OGType            fidl.Type
	Type              string
	BorrowedType      string
	Name              string
	HandleWrapperName string
	HasHandleMetadata bool
}

type Protocol

type Protocol struct {
	fidl.Attributes
	ECI         EncodedCompoundIdentifier
	Name        string
	Methods     []Method
	ServiceName string
}

type Result

type Result struct {
	fidl.Attributes
	ECI       EncodedCompoundIdentifier
	Derives   derives
	Name      string
	Ok        []ResultOkEntry
	ErrOGType fidl.Type
	ErrType   string
	Size      int
	Alignment int
}

type ResultOkEntry

type ResultOkEntry struct {
	OGType            fidl.Type
	Type              string
	HasHandleMetadata bool
	HandleWrapperName string
}

type Root

type Root struct {
	ExternCrates           []string
	Bits                   []Bits
	Consts                 []Const
	Enums                  []Enum
	Structs                []Struct
	Unions                 []Union
	Results                []Result
	Tables                 []Table
	Protocols              []Protocol
	Services               []Service
	HandleMetadataWrappers []HandleMetadataWrapper
}

func Compile

func Compile(r fidl.Root) Root

type Service

type Service struct {
	fidl.Attributes
	Name        string
	Members     []ServiceMember
	ServiceName string
}

type ServiceMember

type ServiceMember struct {
	fidl.Attributes
	ProtocolType string
	Name         string
	CamelName    string
	SnakeName    string
}

type Struct

type Struct struct {
	fidl.Attributes
	ECI                     EncodedCompoundIdentifier
	Derives                 derives
	Name                    string
	Members                 []StructMember
	PaddingMarkers          []PaddingMarker
	FlattenedPaddingMarkers []PaddingMarker
	// Store size and alignment for Old and V1 versions of the wire format. The
	// numbers will be different if the struct contains a union within it. Only
	// structs have this information because fidl::encoding only uses these
	// precalculated numbers for structs and unions.
	Size       int
	Alignment  int
	HasPadding bool
	// True iff the fidl_struct_copy! macro should be used instead of fidl_struct!.
	UseFidlStructCopy bool
}

type StructMember

type StructMember struct {
	fidl.Attributes
	OGType            fidl.Type
	Type              string
	Name              string
	Offset            int
	HasDefault        bool
	DefaultValue      string
	HasHandleMetadata bool
	HandleRights      string
	HandleSubtype     string
}

type Table

type Table struct {
	fidl.Table
	Derives derives
	ECI     EncodedCompoundIdentifier
	Name    string
	Members []TableMember
}

type TableMember

type TableMember struct {
	fidl.Attributes
	OGType            fidl.Type
	Type              string
	Name              string
	Ordinal           int
	HasHandleMetadata bool
	HandleRights      string
	HandleSubtype     string
}

type Type

type Type struct {
	Decl     string
	DeclType fidl.DeclType
	Derives  derives
}

type Union

type Union struct {
	fidl.Union
	Derives derives
	ECI     EncodedCompoundIdentifier
	Name    string
	Members []UnionMember
}

type UnionMember

type UnionMember struct {
	fidl.Attributes
	Type              string
	OGType            fidl.Type
	Name              string
	Ordinal           int
	HasHandleMetadata bool
	HandleRights      string
	HandleSubtype     string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL