Documentation
¶
Index ¶
- type Result
- func (self Result[Ok]) And(res Result[Ok]) Result[Ok]
- func (self Result[Ok]) AsRawParts() (*Ok, error)
- func (self Result[Ok]) Error() error
- func (self Result[Ok]) IfErr(consume func(error))
- func (self Result[Ok]) IfOk(consume func(Ok))
- func (self Result[Ok]) IsErr() bool
- func (self Result[Ok]) IsOk() bool
- func (self Result[Ok]) Match(consumeOk func(Ok), consumeErr func(error))
- func (self Result[T]) Or(res Result[T]) Result[T]
- func (self Result[Ok]) String() string
- func (self Result[Ok]) Value() Ok
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result[Ok any] struct { // contains filtered or unexported fields }
Result is a type that represents either a value or an error.
func (Result[Ok]) AsRawParts ¶ added in v0.2.1
AsRawParts return tuple of value ptr and error.
func (Result[Ok]) IfOk ¶
func (self Result[Ok]) IfOk(consume func(Ok))
IfOk call the function if the Result is Ok.
Click to show internal directories.
Click to hide internal directories.