optional

package
v0.0.0-...-78d9c2c Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyArray

type AnyArray[T any] struct {
	Value []T
	// contains filtered or unexported fields
}

AnyArray is a container for slice type that provides optional semantics without using pointers. It uses encoding/json for marshaling and unmarshaling.

func (AnyArray[T]) IsDefined

func (v AnyArray[T]) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (AnyArray[T]) MarshalJSON

func (v AnyArray[T]) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*AnyArray[T]) SetDefined

func (v *AnyArray[T]) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*AnyArray[T]) UnmarshalJSON

func (v *AnyArray[T]) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type AnyObject

type AnyObject[T any] struct {
	Value T
	// contains filtered or unexported fields
}

AnyObject is a container for struct type that provides optional semantics without using pointers. It uses encoding/json for marshaling and unmarshaling.

func (AnyObject[T]) IsDefined

func (v AnyObject[T]) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (AnyObject[T]) MarshalJSON

func (v AnyObject[T]) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*AnyObject[T]) SetDefined

func (v *AnyObject[T]) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*AnyObject[T]) UnmarshalJSON

func (v *AnyObject[T]) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Array

type Array[T easyjson.MarshalerUnmarshaler] struct {
	Value []T
	New   func() T
	// contains filtered or unexported fields
}

Array is a container for slice type that provides optional semantics without using pointers. The generic argument T must be of type pointer to any struct that implements easyjson marshaler and unmarshaler interfaces.

func (Array[T]) IsDefined

func (v Array[T]) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Array[T]) MarshalEasyJSON

func (v Array[T]) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Array[T]) MarshalJSON

func (v Array[T]) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Array[T]) SetDefined

func (v *Array[T]) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Array[T]) UnmarshalEasyJSON

func (v *Array[T]) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Array[T]) UnmarshalJSON

func (v *Array[T]) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Bool

type Bool struct {
	IsPresent bool
	Value     bool
	// contains filtered or unexported fields
}

Bool is a container for bool type that provides optional semantics without using pointers.

func (Bool) Get

func (v Bool) Get(value bool) bool

Get returns the value if it is not null, otherwise it returns the given default value.

func (Bool) IsDefined

func (v Bool) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Bool) MarshalEasyJSON

func (v Bool) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Bool) MarshalJSON

func (v Bool) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Bool) Set

func (v *Bool) Set(value bool)

Set stores the value and sets it as not null.

func (*Bool) SetDefined

func (v *Bool) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Bool) UnmarshalEasyJSON

func (v *Bool) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Bool) UnmarshalJSON

func (v *Bool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type BoolArray

type BoolArray struct {
	Value []bool
	// contains filtered or unexported fields
}

BoolArray is a container for bool slice type that provides optional semantics without using pointers.

func (BoolArray) IsDefined

func (v BoolArray) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (BoolArray) MarshalEasyJSON

func (v BoolArray) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (BoolArray) MarshalJSON

func (v BoolArray) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*BoolArray) SetDefined

func (v *BoolArray) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*BoolArray) UnmarshalEasyJSON

func (v *BoolArray) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*BoolArray) UnmarshalJSON

func (v *BoolArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Float32

type Float32 struct {
	IsPresent bool
	Value     float32
	// contains filtered or unexported fields
}

Float32 is a container for float32 type that provides optional semantics without using pointers.

func (Float32) Get

func (v Float32) Get(value float32) float32

Get returns the value if it is not null, otherwise it returns the given default value.

func (Float32) IsDefined

func (v Float32) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Float32) MarshalEasyJSON

func (v Float32) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Float32) MarshalJSON

func (v Float32) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Float32) Set

func (v *Float32) Set(value float32)

Set stores the value and sets it as not null.

func (*Float32) SetDefined

func (v *Float32) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Float32) UnmarshalEasyJSON

func (v *Float32) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Float32) UnmarshalJSON

func (v *Float32) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Float32Array

type Float32Array struct {
	Value []float32
	// contains filtered or unexported fields
}

Float32Array is a container for float32 slice type that provides optional semantics without using pointers.

func (Float32Array) IsDefined

func (v Float32Array) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Float32Array) MarshalEasyJSON

func (v Float32Array) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Float32Array) MarshalJSON

func (v Float32Array) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Float32Array) SetDefined

func (v *Float32Array) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Float32Array) UnmarshalEasyJSON

func (v *Float32Array) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Float32Array) UnmarshalJSON

func (v *Float32Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Float64

type Float64 struct {
	IsPresent bool
	Value     float64
	// contains filtered or unexported fields
}

Float64 is a container for float64 type that provides optional semantics without using pointers.

func (Float64) Get

func (v Float64) Get(value float64) float64

Get returns the value if it is not null, otherwise it returns the given default value.

func (Float64) IsDefined

func (v Float64) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Float64) MarshalEasyJSON

func (v Float64) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Float64) MarshalJSON

func (v Float64) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Float64) Set

func (v *Float64) Set(value float64)

Set stores the value and sets it as not null.

func (*Float64) SetDefined

func (v *Float64) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Float64) UnmarshalEasyJSON

func (v *Float64) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Float64) UnmarshalJSON

func (v *Float64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Float64Array

type Float64Array struct {
	Value []float64
	// contains filtered or unexported fields
}

Float64Array is a container for float64 slice type that provides optional semantics without using pointers.

func (Float64Array) IsDefined

func (v Float64Array) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Float64Array) MarshalEasyJSON

func (v Float64Array) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Float64Array) MarshalJSON

func (v Float64Array) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Float64Array) SetDefined

func (v *Float64Array) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Float64Array) UnmarshalEasyJSON

func (v *Float64Array) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Float64Array) UnmarshalJSON

func (v *Float64Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int

type Int struct {
	IsPresent bool
	Value     int
	// contains filtered or unexported fields
}

Int is a container for int type that provides optional semantics without using pointers.

func (Int) Get

func (v Int) Get(value int) int

Get returns the value if it is not null, otherwise it returns the given default value.

func (Int) IsDefined

func (v Int) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Int) MarshalEasyJSON

func (v Int) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int) MarshalJSON

func (v Int) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Int) Set

func (v *Int) Set(value int)

Set stores the value and sets it as not null.

func (*Int) SetDefined

func (v *Int) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Int) UnmarshalEasyJSON

func (v *Int) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int) UnmarshalJSON

func (v *Int) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int8

type Int8 struct {
	IsPresent bool
	Value     int8
	// contains filtered or unexported fields
}

Int8 is a container for int8 type that provides optional semantics without using pointers.

func (Int8) Get

func (v Int8) Get(value int8) int8

Get returns the value if it is not null, otherwise it returns the given default value.

func (Int8) IsDefined

func (v Int8) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Int8) MarshalEasyJSON

func (v Int8) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int8) MarshalJSON

func (v Int8) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Int8) Set

func (v *Int8) Set(value int8)

Set stores the value and sets it as not null.

func (*Int8) SetDefined

func (v *Int8) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Int8) UnmarshalEasyJSON

func (v *Int8) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int8) UnmarshalJSON

func (v *Int8) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int8Array

type Int8Array struct {
	Value []int8
	// contains filtered or unexported fields
}

Int8Array is a container for int8 slice type that provides optional semantics without using pointers.

func (Int8Array) IsDefined

func (v Int8Array) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Int8Array) MarshalEasyJSON

func (v Int8Array) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int8Array) MarshalJSON

func (v Int8Array) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Int8Array) SetDefined

func (v *Int8Array) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Int8Array) UnmarshalEasyJSON

func (v *Int8Array) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int8Array) UnmarshalJSON

func (v *Int8Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int16

type Int16 struct {
	IsPresent bool
	Value     int16
	// contains filtered or unexported fields
}

Int16 is a container for int16 type that provides optional semantics without using pointers.

func (Int16) Get

func (v Int16) Get(value int16) int16

Get returns the value if it is not null, otherwise it returns the given default value.

func (Int16) IsDefined

func (v Int16) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Int16) MarshalEasyJSON

func (v Int16) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int16) MarshalJSON

func (v Int16) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Int16) Set

func (v *Int16) Set(value int16)

Set stores the value and sets it as not null.

func (*Int16) SetDefined

func (v *Int16) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Int16) UnmarshalEasyJSON

func (v *Int16) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int16) UnmarshalJSON

func (v *Int16) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int16Array

type Int16Array struct {
	Value []int16
	// contains filtered or unexported fields
}

Int16Array is a container for int16 slice type that provides optional semantics without using pointers.

func (Int16Array) IsDefined

func (v Int16Array) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Int16Array) MarshalEasyJSON

func (v Int16Array) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int16Array) MarshalJSON

func (v Int16Array) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Int16Array) SetDefined

func (v *Int16Array) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Int16Array) UnmarshalEasyJSON

func (v *Int16Array) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int16Array) UnmarshalJSON

func (v *Int16Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int32

type Int32 struct {
	IsPresent bool
	Value     int32
	// contains filtered or unexported fields
}

Int32 is a container for int32 type that provides optional semantics without using pointers.

func (Int32) Get

func (v Int32) Get(value int32) int32

Get returns the value if it is not null, otherwise it returns the given default value.

func (Int32) IsDefined

func (v Int32) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Int32) MarshalEasyJSON

func (v Int32) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int32) MarshalJSON

func (v Int32) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Int32) Set

func (v *Int32) Set(value int32)

Set stores the value and sets it as not null.

func (*Int32) SetDefined

func (v *Int32) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Int32) UnmarshalEasyJSON

func (v *Int32) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int32) UnmarshalJSON

func (v *Int32) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int32Array

type Int32Array struct {
	Value []int32
	// contains filtered or unexported fields
}

Int32Array is a container for int32 slice type that provides optional semantics without using pointers.

func (Int32Array) IsDefined

func (v Int32Array) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Int32Array) MarshalEasyJSON

func (v Int32Array) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int32Array) MarshalJSON

func (v Int32Array) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Int32Array) SetDefined

func (v *Int32Array) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Int32Array) UnmarshalEasyJSON

func (v *Int32Array) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int32Array) UnmarshalJSON

func (v *Int32Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int64

type Int64 struct {
	IsPresent bool
	Value     int64
	// contains filtered or unexported fields
}

Int64 is a container for int64 type that provides optional semantics without using pointers.

func (Int64) Get

func (v Int64) Get(value int64) int64

Get returns the value if it is not null, otherwise it returns the given default value.

func (Int64) IsDefined

func (v Int64) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Int64) MarshalEasyJSON

func (v Int64) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int64) MarshalJSON

func (v Int64) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Int64) Set

func (v *Int64) Set(value int64)

Set stores the value and sets it as not null.

func (*Int64) SetDefined

func (v *Int64) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Int64) UnmarshalEasyJSON

func (v *Int64) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int64) UnmarshalJSON

func (v *Int64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int64Array

type Int64Array struct {
	Value []int64
	// contains filtered or unexported fields
}

Int64Array is a container for int64 slice type that provides optional semantics without using pointers.

func (Int64Array) IsDefined

func (v Int64Array) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Int64Array) MarshalEasyJSON

func (v Int64Array) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int64Array) MarshalJSON

func (v Int64Array) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Int64Array) SetDefined

func (v *Int64Array) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Int64Array) UnmarshalEasyJSON

func (v *Int64Array) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int64Array) UnmarshalJSON

func (v *Int64Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type IntArray

type IntArray struct {
	Value []int
	// contains filtered or unexported fields
}

IntArray is a container for int slice type that provides optional semantics without using pointers.

func (IntArray) IsDefined

func (v IntArray) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (IntArray) MarshalEasyJSON

func (v IntArray) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (IntArray) MarshalJSON

func (v IntArray) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*IntArray) SetDefined

func (v *IntArray) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*IntArray) UnmarshalEasyJSON

func (v *IntArray) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*IntArray) UnmarshalJSON

func (v *IntArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Object

type Object[T easyjson.MarshalerUnmarshaler] struct {
	Value T
	New   func() T
	// contains filtered or unexported fields
}

Object is a container for struct type that provides optional semantics without using pointers. The generic argument T must be of type pointer to any struct that implements easyjson marshaler and unmarshaler interfaces.

func (Object[T]) IsDefined

func (v Object[T]) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (Object[T]) MarshalEasyJSON

func (v Object[T]) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Object[T]) MarshalJSON

func (v Object[T]) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*Object[T]) SetDefined

func (v *Object[T]) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*Object[T]) UnmarshalEasyJSON

func (v *Object[T]) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Object[T]) UnmarshalJSON

func (v *Object[T]) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type String

type String struct {
	IsPresent bool
	Value     string
	// contains filtered or unexported fields
}

String is a container for string type that provides optional semantics without using pointers.

func (String) Get

func (v String) Get(value string) string

Get returns the value if it is not null, otherwise it returns the given default value.

func (String) IsDefined

func (v String) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (String) MarshalEasyJSON

func (v String) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (String) MarshalJSON

func (v String) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*String) Set

func (v *String) Set(value string)

Set stores the value and sets it as not null.

func (*String) SetDefined

func (v *String) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*String) UnmarshalEasyJSON

func (v *String) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*String) UnmarshalJSON

func (v *String) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type StringArray

type StringArray struct {
	Value []string
	// contains filtered or unexported fields
}

StringArray is a container for string slice type that provides optional semantics without using pointers.

func (StringArray) IsDefined

func (v StringArray) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (StringArray) MarshalEasyJSON

func (v StringArray) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (StringArray) MarshalJSON

func (v StringArray) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*StringArray) SetDefined

func (v *StringArray) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*StringArray) UnmarshalEasyJSON

func (v *StringArray) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*StringArray) UnmarshalJSON

func (v *StringArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type UInt

type UInt struct {
	IsPresent bool
	Value     uint
	// contains filtered or unexported fields
}

UInt is a container for uint type that provides optional semantics without using pointers.

func (UInt) Get

func (v UInt) Get(value uint) uint

Get returns the value if it is not null, otherwise it returns the given default value.

func (UInt) IsDefined

func (v UInt) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (UInt) MarshalEasyJSON

func (v UInt) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (UInt) MarshalJSON

func (v UInt) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*UInt) Set

func (v *UInt) Set(value uint)

Set stores the value and sets it as not null.

func (*UInt) SetDefined

func (v *UInt) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*UInt) UnmarshalEasyJSON

func (v *UInt) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*UInt) UnmarshalJSON

func (v *UInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type UInt8

type UInt8 struct {
	IsPresent bool
	Value     uint8
	// contains filtered or unexported fields
}

UInt8 is a container for uint8 type that provides optional semantics without using pointers.

func (UInt8) Get

func (v UInt8) Get(value uint8) uint8

Get returns the value if it is not null, otherwise it returns the given default value.

func (UInt8) IsDefined

func (v UInt8) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (UInt8) MarshalEasyJSON

func (v UInt8) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (UInt8) MarshalJSON

func (v UInt8) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*UInt8) Set

func (v *UInt8) Set(value uint8)

Set stores the value and sets it as not null.

func (*UInt8) SetDefined

func (v *UInt8) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*UInt8) UnmarshalEasyJSON

func (v *UInt8) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*UInt8) UnmarshalJSON

func (v *UInt8) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type UInt8Array

type UInt8Array struct {
	Value []uint8
	// contains filtered or unexported fields
}

UInt8Array is a container for uint8 slice type that provides optional semantics without using pointers.

func (UInt8Array) IsDefined

func (v UInt8Array) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (UInt8Array) MarshalEasyJSON

func (v UInt8Array) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (UInt8Array) MarshalJSON

func (v UInt8Array) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*UInt8Array) SetDefined

func (v *UInt8Array) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*UInt8Array) UnmarshalEasyJSON

func (v *UInt8Array) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*UInt8Array) UnmarshalJSON

func (v *UInt8Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type UInt16

type UInt16 struct {
	IsPresent bool
	Value     uint16
	// contains filtered or unexported fields
}

UInt16 is a container for uint16 type that provides optional semantics without using pointers.

func (UInt16) Get

func (v UInt16) Get(value uint16) uint16

Get returns the value if it is not null, otherwise it returns the given default value.

func (UInt16) IsDefined

func (v UInt16) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (UInt16) MarshalEasyJSON

func (v UInt16) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (UInt16) MarshalJSON

func (v UInt16) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*UInt16) Set

func (v *UInt16) Set(value uint16)

Set stores the value and sets it as not null.

func (*UInt16) SetDefined

func (v *UInt16) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*UInt16) UnmarshalEasyJSON

func (v *UInt16) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*UInt16) UnmarshalJSON

func (v *UInt16) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type UInt16Array

type UInt16Array struct {
	Value []uint16
	// contains filtered or unexported fields
}

UInt16Array is a container for uint16 slice type that provides optional semantics without using pointers.

func (UInt16Array) IsDefined

func (v UInt16Array) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (UInt16Array) MarshalEasyJSON

func (v UInt16Array) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (UInt16Array) MarshalJSON

func (v UInt16Array) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*UInt16Array) SetDefined

func (v *UInt16Array) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*UInt16Array) UnmarshalEasyJSON

func (v *UInt16Array) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*UInt16Array) UnmarshalJSON

func (v *UInt16Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type UInt32

type UInt32 struct {
	IsPresent bool
	Value     uint32
	// contains filtered or unexported fields
}

UInt32 is a container for uint32 type that provides optional semantics without using pointers.

func (UInt32) Get

func (v UInt32) Get(value uint32) uint32

Get returns the value if it is not null, otherwise it returns the given default value.

func (UInt32) IsDefined

func (v UInt32) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (UInt32) MarshalEasyJSON

func (v UInt32) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (UInt32) MarshalJSON

func (v UInt32) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*UInt32) Set

func (v *UInt32) Set(value uint32)

Set stores the value and sets it as not null.

func (*UInt32) SetDefined

func (v *UInt32) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*UInt32) UnmarshalEasyJSON

func (v *UInt32) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*UInt32) UnmarshalJSON

func (v *UInt32) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type UInt32Array

type UInt32Array struct {
	Value []uint32
	// contains filtered or unexported fields
}

UInt32Array is a container for uint32 slice type that provides optional semantics without using pointers.

func (UInt32Array) IsDefined

func (v UInt32Array) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (UInt32Array) MarshalEasyJSON

func (v UInt32Array) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (UInt32Array) MarshalJSON

func (v UInt32Array) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*UInt32Array) SetDefined

func (v *UInt32Array) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*UInt32Array) UnmarshalEasyJSON

func (v *UInt32Array) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*UInt32Array) UnmarshalJSON

func (v *UInt32Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type UInt64

type UInt64 struct {
	IsPresent bool
	Value     uint64
	// contains filtered or unexported fields
}

UInt64 is a container for uint64 type that provides optional semantics without using pointers.

func (UInt64) Get

func (v UInt64) Get(value uint64) uint64

Get returns the value if it is not null, otherwise it returns the given default value.

func (UInt64) IsDefined

func (v UInt64) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (UInt64) MarshalEasyJSON

func (v UInt64) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (UInt64) MarshalJSON

func (v UInt64) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*UInt64) Set

func (v *UInt64) Set(value uint64)

Set stores the value and sets it as not null.

func (*UInt64) SetDefined

func (v *UInt64) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*UInt64) UnmarshalEasyJSON

func (v *UInt64) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*UInt64) UnmarshalJSON

func (v *UInt64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type UInt64Array

type UInt64Array struct {
	Value []uint64
	// contains filtered or unexported fields
}

UInt64Array is a container for uint64 slice type that provides optional semantics without using pointers.

func (UInt64Array) IsDefined

func (v UInt64Array) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (UInt64Array) MarshalEasyJSON

func (v UInt64Array) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (UInt64Array) MarshalJSON

func (v UInt64Array) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*UInt64Array) SetDefined

func (v *UInt64Array) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*UInt64Array) UnmarshalEasyJSON

func (v *UInt64Array) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*UInt64Array) UnmarshalJSON

func (v *UInt64Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type UIntArray

type UIntArray struct {
	Value []uint
	// contains filtered or unexported fields
}

UIntArray is a container for uint slice type that provides optional semantics without using pointers.

func (UIntArray) IsDefined

func (v UIntArray) IsDefined() bool

IsDefined determines whether this field should be included in the json output, if it has the omitempty tag.

func (UIntArray) MarshalEasyJSON

func (v UIntArray) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (UIntArray) MarshalJSON

func (v UIntArray) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (*UIntArray) SetDefined

func (v *UIntArray) SetDefined(isDefined bool)

SetDefined is the setter for isDefined, see IsDefined.

func (*UIntArray) UnmarshalEasyJSON

func (v *UIntArray) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*UIntArray) UnmarshalJSON

func (v *UIntArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

Jump to

Keyboard shortcuts

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