Documentation
¶
Overview ¶
Package result provides a typed sum value representing either a successful outcome (Ok branch) or a failure (Err branch). It's used as the return type of github.com/fil-forge/ucantone/ucan.Receipt.Out.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result[O, X any] struct { // contains filtered or unexported fields }
Result is a typed sum: either an Ok value of type O or an Err value of type X. Construct with OK or Err; inspect with Result.IsOK or unpack into a Go (ok, err) pair with Result.Unpack.
Both branches are zero-valued when the other branch is set; use IsOK to disambiguate before reading the populated branch.
Click to show internal directories.
Click to hide internal directories.