deferred

package
v0.0.0-...-32485fb Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Noop

func Noop[T interface{}](_ T) error

Types

type Deferred

type Deferred[T interface{}] interface {
	Then(DeferredCallback[T], DeferredCallback[error]) Deferred[any]
}

type DeferredCallback

type DeferredCallback[T interface{}] func(T) error

type DeferredImp

type DeferredImp[T interface{}] struct {
	// contains filtered or unexported fields
}

func (*DeferredImp[T]) OccurredErr

func (d *DeferredImp[T]) OccurredErr() error

func (*DeferredImp[T]) Reject

func (d *DeferredImp[T]) Reject(err error)

func (*DeferredImp[T]) Resolve

func (d *DeferredImp[T]) Resolve(value T)

func (*DeferredImp[T]) Then

func (d *DeferredImp[T]) Then(onSuccess DeferredCallback[T], onError DeferredCallback[error]) Deferred[any]

Jump to

Keyboard shortcuts

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