Documentation
¶
Index ¶
- type Error
- func (err Error[T]) Error(call func(error) Result[T]) Result[T]
- func (err Error[T]) Or(value T) Result[T]
- func (err Error[T]) String() string
- func (err Error[T]) Then(func(T) Result[T]) Result[T]
- func (err Error[T]) TryError() error
- func (err Error[T]) TryValue() T
- func (err Error[T]) WhenError(call func(error)) Result[T]
- func (err Error[T]) WhenOK(call func(T)) Result[T]
- type Nothing
- func (nothing Nothing[T]) Else(call func() Option[T]) Option[T]
- func (nothing Nothing[T]) Or(value T) Option[T]
- func (Nothing[T]) String() string
- func (nothing Nothing[T]) Then(call func(T) Option[T]) Option[T]
- func (Nothing[T]) TryValue() T
- func (nothing Nothing[T]) WhenNothing(call func()) Option[T]
- func (nothing Nothing[T]) WhenValue(call func(T)) Option[T]
- type OK
- func (ok OK[T]) Error(func(error) Result[T]) Result[T]
- func (ok OK[T]) Or(T) Result[T]
- func (ok OK[T]) String() string
- func (ok OK[T]) Then(call func(T) Result[T]) Result[T]
- func (ok OK[T]) TryError() error
- func (ok OK[T]) TryValue() T
- func (ok OK[T]) WhenError(func(error)) Result[T]
- func (ok OK[T]) WhenOK(call func(T)) Result[T]
- type Option
- type OptionIsNothingError
- type Result
- type ResultIsErrorError
- type ResultIsOkError
- type Value
- func (value Value[T]) Else(func() Option[T]) Option[T]
- func (value Value[T]) Or(T) Option[T]
- func (value Value[T]) String() string
- func (value Value[T]) Then(call func(T) Option[T]) Option[T]
- func (value Value[T]) TryValue() T
- func (value Value[T]) WhenNothing(func()) Option[T]
- func (value Value[T]) WhenValue(call func(T)) Option[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionIsNothingError ¶ added in v0.0.9
type OptionIsNothingError struct {
// contains filtered or unexported fields
}
func NewOptionsIsNothingError ¶ added in v0.0.9
func NewOptionsIsNothingError() OptionIsNothingError
type ResultIsErrorError ¶ added in v0.0.9
type ResultIsErrorError struct {
Err error
// contains filtered or unexported fields
}
func NewResultIsErrorError ¶ added in v0.0.9
func NewResultIsErrorError(err error) ResultIsErrorError
type ResultIsOkError ¶ added in v0.0.9
type ResultIsOkError struct {
// contains filtered or unexported fields
}
func NewResultIsOkError ¶ added in v0.0.9
func NewResultIsOkError() ResultIsOkError
Click to show internal directories.
Click to hide internal directories.