A 'gotemplate'-based type for providing optional semantics without using pointers.
type Bool struct { V bool Defined bool }
func OBool(v bool) Bool
Creates an optional type with a given value.
func (v Bool) Get(deflt bool) bool
Get returns the value or given default in the case the value is undefined.
func (v Bool) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Bool) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Bool) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Bool) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Bool) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Bool) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Float32 struct { V float32 Defined bool }
func OFloat32(v float32) Float32
Creates an optional type with a given value.
func (v Float32) Get(deflt float32) float32
Get returns the value or given default in the case the value is undefined.
func (v Float32) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Float32) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Float32) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Float32) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Float32) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Float32) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Float64 struct { V float64 Defined bool }
func OFloat64(v float64) Float64
Creates an optional type with a given value.
func (v Float64) Get(deflt float64) float64
Get returns the value or given default in the case the value is undefined.
func (v Float64) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Float64) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Float64) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Float64) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Float64) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Float64) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Int struct { V int Defined bool }
func OInt(v int) Int
Creates an optional type with a given value.
func (v Int) Get(deflt int) int
Get returns the value or given default in the case the value is undefined.
func (v Int) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Int) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Int) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Int) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Int) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Int) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Int16 struct { V int16 Defined bool }
func OInt16(v int16) Int16
Creates an optional type with a given value.
func (v Int16) Get(deflt int16) int16
Get returns the value or given default in the case the value is undefined.
func (v Int16) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Int16) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Int16) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Int16) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Int16) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Int16) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Int32 struct { V int32 Defined bool }
func OInt32(v int32) Int32
Creates an optional type with a given value.
func (v Int32) Get(deflt int32) int32
Get returns the value or given default in the case the value is undefined.
func (v Int32) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Int32) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Int32) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Int32) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Int32) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Int32) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Int64 struct { V int64 Defined bool }
func OInt64(v int64) Int64
Creates an optional type with a given value.
func (v Int64) Get(deflt int64) int64
Get returns the value or given default in the case the value is undefined.
func (v Int64) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Int64) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Int64) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Int64) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Int64) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Int64) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Int8 struct { V int8 Defined bool }
func OInt8(v int8) Int8
Creates an optional type with a given value.
func (v Int8) Get(deflt int8) int8
Get returns the value or given default in the case the value is undefined.
func (v Int8) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Int8) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Int8) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Int8) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Int8) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Int8) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type String struct { V string Defined bool }
func OString(v string) String
Creates an optional type with a given value.
func (v String) Get(deflt string) string
Get returns the value or given default in the case the value is undefined.
func (v String) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v String) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v String) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v String) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *String) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *String) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Uint struct { V uint Defined bool }
func OUint(v uint) Uint
Creates an optional type with a given value.
func (v Uint) Get(deflt uint) uint
Get returns the value or given default in the case the value is undefined.
func (v Uint) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Uint) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Uint) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Uint) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Uint) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Uint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Uint16 struct { V uint16 Defined bool }
func OUint16(v uint16) Uint16
Creates an optional type with a given value.
func (v Uint16) Get(deflt uint16) uint16
Get returns the value or given default in the case the value is undefined.
func (v Uint16) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Uint16) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Uint16) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Uint16) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Uint16) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Uint16) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Uint32 struct { V uint32 Defined bool }
func OUint32(v uint32) Uint32
Creates an optional type with a given value.
func (v Uint32) Get(deflt uint32) uint32
Get returns the value or given default in the case the value is undefined.
func (v Uint32) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Uint32) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Uint32) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Uint32) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Uint32) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Uint32) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Uint64 struct { V uint64 Defined bool }
func OUint64(v uint64) Uint64
Creates an optional type with a given value.
func (v Uint64) Get(deflt uint64) uint64
Get returns the value or given default in the case the value is undefined.
func (v Uint64) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Uint64) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Uint64) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Uint64) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Uint64) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Uint64) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.
A 'gotemplate'-based type for providing optional semantics without using pointers.
type Uint8 struct { V uint8 Defined bool }
func OUint8(v uint8) Uint8
Creates an optional type with a given value.
func (v Uint8) Get(deflt uint8) uint8
Get returns the value or given default in the case the value is undefined.
func (v Uint8) IsDefined() bool
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (v Uint8) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (v Uint8) MarshalJSON() ([]byte, error)
MarshalJSON implements a standard json marshaler interface.
func (v Uint8) String() string
String implements a stringer interface using fmt.Sprint for the value.
func (v *Uint8) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Uint8) UnmarshalJSON(data []byte) error
UnmarshalJSON implements a standard json unmarshaler interface.