Documentation
¶
Index ¶
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]) Get ¶
If this Optional is Some, returns the value inhabiting this Optional and true. Otherwise, returns the Go's default value for T and false.
func (Optional[T]) GetOrDefault ¶
func (opt Optional[T]) GetOrDefault(defaultValue T) T
Returns the value inhabiting this Optional, or the given default value if this Optional is None.
func (Optional[T]) MarshalJSON ¶
func (*Optional[T]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.