Documentation
¶
Index ¶
- func ToFunctor[T any, R any](fn func(T) (R, error)) func(*Result[T]) *Result[R]
- type Result
- func (r *Result[T]) AndThen(fn func(T) (T, error)) *Result[T]
- func (r *Result[T]) Err() error
- func (r *Result[T]) Map(fn func(T) (T, error))
- func (r *Result[T]) MapOr(fn func(T) (T, error), defaultValue T)
- func (r *Result[T]) Ok() bool
- func (r *Result[T]) Replace(fn func(T) (T, error))
- func (r *Result[T]) ReplaceOr(fn func(T) (T, error), defaultValue T)
- func (r *Result[T]) Unwrap() T
- func (r *Result[T]) UnwrapOr(defaultValue T) T
- func (r *Result[T]) UnwrapOrPanic(err error) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.