Documentation
¶
Index ¶
- type Maybe
- func (o Maybe[T]) Get() (T, bool)
- func (o Maybe[T]) IsNone() bool
- func (o Maybe[T]) IsSome() bool
- func (o Maybe[T]) MarshalJSON() ([]byte, error)
- func (o *Maybe[T]) ParseAny(v any) error
- func (o *Maybe[T]) Scan(src any) error
- func (o *Maybe[T]) SetDefault()
- func (o *Maybe[T]) UnmarshalJSON(data []byte) error
- func (o Maybe[T]) Unwrap() T
- func (o Maybe[T]) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Maybe ¶
type Maybe[T any] struct { // contains filtered or unexported fields }
Contains some or none value based on ok
func (Maybe[T]) MarshalJSON ¶
func (*Maybe[T]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.