Documentation
¶
Index ¶
- func AreAllEmpty[T any, N Nullable[T]](in ...N) bool
- func AreAllFilled[T any, N Nullable[T]](in ...N) bool
- func Compare[T constraints.Integer | constraints.Float, N Nullable[T]](a, b N) (int, T, T)
- func SomeFromTyped[T any, N Nullable[T]](nullable N) T
- type Native
- type Null
- func (n Null[T]) Expect(errMessage string) (T, error)
- func (n Null[T]) Filled() bool
- func (n Null[T]) Get() (T, bool)
- func (n Null[T]) Grpc() *T
- func (n Null[T]) MarshalJSON() ([]byte, error)
- func (n Null[T]) OrDefault(d T) T
- func (n Null[T]) Some() T
- func (n Null[T]) String() string
- func (n *Null[T]) UnmarshalJSON(data []byte) error
- type Nullable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreAllEmpty ¶
func AreAllFilled ¶
func Compare ¶
func Compare[T constraints.Integer | constraints.Float, N Nullable[T]](a, b N) (int, T, T)
Compare compares A to B and returns
- +1 if a > b
- -1 if a < b
- 0 if a = b or EITHER ONE is not set
func SomeFromTyped ¶
Types ¶
type Null ¶
type Null[T any] struct { // contains filtered or unexported fields }
func GrpcToNull ¶
func (Null[T]) MarshalJSON ¶
func (*Null[T]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.