Documentation
¶
Index ¶
- type Result
- func (o Result[T]) AndThen(fn func(T) bool) bool
- func (o *Result[T]) IsErr() bool
- func (o *Result[T]) IsOk() bool
- func (o Result[T]) Split() (T, error)
- func (o Result[T]) Then(fn func(T))
- func (o Result[T]) Unwrap() T
- func (o Result[T]) UnwrapErr() error
- func (o Result[T]) UnwrapOr(t T) T
- func (o Result[T]) UnwrapPtr() *T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result[T any] struct { // contains filtered or unexported fields }
func (*Result[T]) IsErr ¶
Returns true if the Option does not contain a value, false otherwise.
Inverse of IsSome
func (*Result[T]) IsOk ¶
Returns true if the Option contains a value, false otherwise.
Inverse of IsNone
Click to show internal directories.
Click to hide internal directories.