target

package
v3.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Target

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

Target is a type-safe variant that can hold one of three value types: bool, string, or rect.Rect. It provides methods for type checking, safe value retrieval, and JSON serialization/deserialization.

func NewBool

func NewBool(b bool) Target

func NewRect

func NewRect(r rect.Rect) Target

func NewString

func NewString(s string) Target

func (Target) AsBool

func (t Target) AsBool() (bool, error)

func (Target) AsRect

func (t Target) AsRect() (rect.Rect, error)

func (Target) AsString

func (t Target) AsString() (string, error)

func (Target) IsBool

func (t Target) IsBool() bool

func (Target) IsRect

func (t Target) IsRect() bool

func (Target) IsString

func (t Target) IsString() bool

func (Target) IsZero

func (t Target) IsZero() bool

func (Target) MarshalJSON

func (t Target) MarshalJSON() ([]byte, error)

func (*Target) UnmarshalJSON

func (t *Target) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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