Documentation
¶
Index ¶
- func As[T constraints.Integer](r1 uintptr, r2 uintptr, err error) T
- func AsBool(r1 uintptr, r2 uintptr, err error) bool
- func IsNoError(err error) bool
- func MustNoError[T constraints.Integer](r1 uintptr, r2 uintptr, err error) (T, error)
- func MustNotNegativeOne[T constraints.Signed](r1 uintptr, r2 uintptr, err error) (T, error)
- func MustNotZero[T constraints.Integer | ~unsafe.Pointer](r1 uintptr, r2 uintptr, err error) (T, error)
- func MustTrue(r1 uintptr, r2 uintptr, err error) error
- func MustZero(r1 uintptr, r2 uintptr, err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func As ¶
func As[T constraints.Integer](r1 uintptr, r2 uintptr, err error) T
As returns T(r1) and ignores err.
func IsNoError ¶
IsNoError returns whether err matches(errors.Is) syscall.Error(0). This usually means no error during calling a syscall.
func MustNoError ¶
MustNoError returns (r1, nil) if err is(IsNoError) something other than syscall.Errno(0), r1, err otherwise.
func MustNotNegativeOne ¶
MustNotNegativeOne returns (r1, nil) if r1 is not -1, (r1, err) otherwise.
func MustNotZero ¶
func MustNotZero[T constraints.Integer | ~unsafe.Pointer](r1 uintptr, r2 uintptr, err error) (T, error)
MustNotZero returns (r1, nil) if r1 is not zero, (r1, err) otherwise.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.