polymorphism

package
v2.14.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Parameter_Kind_name = map[int32]string{
		0: "UNDEFINED",
		1: "POSITIONAL_ONLY",
		2: "POSITIONAL_OR_KEYWORD",
		3: "VAR_POSITIONAL",
		4: "KEYWORD_ONLY",
		5: "VAR_KEYWORD",
	}
	Parameter_Kind_value = map[string]int32{
		"UNDEFINED":             0,
		"POSITIONAL_ONLY":       1,
		"POSITIONAL_OR_KEYWORD": 2,
		"VAR_POSITIONAL":        3,
		"KEYWORD_ONLY":          4,
		"VAR_KEYWORD":           5,
	}
)

Enum value maps for Parameter_Kind.

View Source
var File_tensorflow_core_function_polymorphism_function_type_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Capture

type Capture struct {
	Name           *string                         `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	TypeConstraint *trace_type.SerializedTraceType `protobuf:"bytes,2,opt,name=type_constraint,json=typeConstraint" json:"type_constraint,omitempty"`
	// contains filtered or unexported fields
}

Represents a serialized Capture type.

func (*Capture) Descriptor deprecated

func (*Capture) Descriptor() ([]byte, []int)

Deprecated: Use Capture.ProtoReflect.Descriptor instead.

func (*Capture) GetName

func (x *Capture) GetName() string

func (*Capture) GetTypeConstraint

func (x *Capture) GetTypeConstraint() *trace_type.SerializedTraceType

func (*Capture) ProtoMessage

func (*Capture) ProtoMessage()

func (*Capture) ProtoReflect

func (x *Capture) ProtoReflect() protoreflect.Message

func (*Capture) Reset

func (x *Capture) Reset()

func (*Capture) String

func (x *Capture) String() string

type FunctionType

type FunctionType struct {
	Parameters []*Parameter `protobuf:"bytes,1,rep,name=parameters" json:"parameters,omitempty"`
	Captures   []*Capture   `protobuf:"bytes,2,rep,name=captures" json:"captures,omitempty"` // TODO(fmuham): Add support for return type.
	// contains filtered or unexported fields
}

Represents a serialized FunctionType.

func (*FunctionType) Descriptor deprecated

func (*FunctionType) Descriptor() ([]byte, []int)

Deprecated: Use FunctionType.ProtoReflect.Descriptor instead.

func (*FunctionType) GetCaptures

func (x *FunctionType) GetCaptures() []*Capture

func (*FunctionType) GetParameters

func (x *FunctionType) GetParameters() []*Parameter

func (*FunctionType) ProtoMessage

func (*FunctionType) ProtoMessage()

func (*FunctionType) ProtoReflect

func (x *FunctionType) ProtoReflect() protoreflect.Message

func (*FunctionType) Reset

func (x *FunctionType) Reset()

func (*FunctionType) String

func (x *FunctionType) String() string

type Parameter

type Parameter struct {
	Name           *string                         `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Kind           *Parameter_Kind                 `` /* 127-byte string literal not displayed */
	IsOptional     *bool                           `protobuf:"varint,3,opt,name=is_optional,json=isOptional" json:"is_optional,omitempty"`
	TypeConstraint *trace_type.SerializedTraceType `protobuf:"bytes,4,opt,name=type_constraint,json=typeConstraint" json:"type_constraint,omitempty"`
	// contains filtered or unexported fields
}

Represents a serialized Parameter type.

func (*Parameter) Descriptor deprecated

func (*Parameter) Descriptor() ([]byte, []int)

Deprecated: Use Parameter.ProtoReflect.Descriptor instead.

func (*Parameter) GetIsOptional

func (x *Parameter) GetIsOptional() bool

func (*Parameter) GetKind

func (x *Parameter) GetKind() Parameter_Kind

func (*Parameter) GetName

func (x *Parameter) GetName() string

func (*Parameter) GetTypeConstraint

func (x *Parameter) GetTypeConstraint() *trace_type.SerializedTraceType

func (*Parameter) ProtoMessage

func (*Parameter) ProtoMessage()

func (*Parameter) ProtoReflect

func (x *Parameter) ProtoReflect() protoreflect.Message

func (*Parameter) Reset

func (x *Parameter) Reset()

func (*Parameter) String

func (x *Parameter) String() string

type Parameter_Kind

type Parameter_Kind int32
const (
	Parameter_UNDEFINED             Parameter_Kind = 0
	Parameter_POSITIONAL_ONLY       Parameter_Kind = 1
	Parameter_POSITIONAL_OR_KEYWORD Parameter_Kind = 2
	Parameter_VAR_POSITIONAL        Parameter_Kind = 3
	Parameter_KEYWORD_ONLY          Parameter_Kind = 4
	Parameter_VAR_KEYWORD           Parameter_Kind = 5
)

func (Parameter_Kind) Descriptor

func (Parameter_Kind) Enum

func (x Parameter_Kind) Enum() *Parameter_Kind

func (Parameter_Kind) EnumDescriptor deprecated

func (Parameter_Kind) EnumDescriptor() ([]byte, []int)

Deprecated: Use Parameter_Kind.Descriptor instead.

func (Parameter_Kind) Number

func (Parameter_Kind) String

func (x Parameter_Kind) String() string

func (Parameter_Kind) Type

func (*Parameter_Kind) UnmarshalJSON deprecated

func (x *Parameter_Kind) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

Jump to

Keyboard shortcuts

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