Documentation ¶
Index ¶
- type Optional
- func (o Optional[T]) Get() T
- func (o Optional[T]) GetDefault(x T) T
- func (o Optional[T]) GetOr(f func() T) T
- func (o Optional[T]) IsNone() bool
- func (o Optional[T]) IsSome() bool
- func (o Optional[T]) MarshalJSON() ([]byte, error)
- func (o *Optional[T]) Scan(value any) error
- func (o *Optional[T]) UnmarshalJSON(b []byte) error
- func (o Optional[T]) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Optional ¶
type Optional[T any] struct { // contains filtered or unexported fields }
func (Optional[T]) GetDefault ¶
func (o Optional[T]) GetDefault(x T) T
func (Optional[T]) MarshalJSON ¶
func (*Optional[T]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.