result

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result[O any] struct {
	// contains filtered or unexported fields
}

func GetResult

func GetResult[T any](fn supererrors.ErrorFn[T], ignore ...error) *Result[T]

func (Result[O]) Equals

func (r Result[O]) Equals(other Result[O]) bool

func (Result[O]) Error

func (r Result[O]) Error() error

func (Result[O]) IsFailure

func (r Result[O]) IsFailure() bool

func (Result[O]) IsSuccess

func (r Result[O]) IsSuccess() bool

func (Result[O]) Output

func (r Result[O]) Output() O

func (*Result[O]) SetError

func (r *Result[O]) SetError(fault error) *Result[O]

func (*Result[O]) SetOutput

func (r *Result[O]) SetOutput(value O) *Result[O]

func (*Result[O]) SetState

func (r *Result[O]) SetState(state State) *Result[O]

func (Result[O]) State

func (r Result[O]) State() State

type State

type State int
const (
	Success         State = 0b0001
	Failure         State = 0b0010
	ExpectedFailure State = 0b0011
)

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL