result

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 0 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[T comparable] struct {
	// contains filtered or unexported fields
}

Result contains the result tuple of an operation.

func NewResult

func NewResult[T comparable](val T, err error) *Result[T]

NewResult constructs a new result container.

func (*Result[T]) Compare

func (r *Result[T]) Compare(ot *Result[T]) bool

Compare compares two Result objects for equality.

func (*Result[T]) GetValue

func (r *Result[T]) GetValue() (val T, err error)

GetValue returns the result and error value.

Jump to

Keyboard shortcuts

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