observer

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lift

func Lift[F rx.AnonymousObserver[T], T any](fn F) rx.Observer[T]

func Map

func Map[T, V any](obs rx.Observer[T], fn func(V) T) rx.Observer[V]

func Subscribe

func Subscribe[F rx.AnonymousObserver[T], T any](
	observable rx.Observable[T], fn F,
) rx.Subscription

Types

type Anonymous

type Anonymous[T any] struct {
	Complete func()
	Error    func(error)
	Next     func(T)
}

func (Anonymous[T]) OnComplete

func (a Anonymous[T]) OnComplete()

OnComplete implements rx.Observer.

func (Anonymous[T]) OnError

func (a Anonymous[T]) OnError(err error)

OnError implements rx.Observer.

func (Anonymous[T]) OnNext

func (a Anonymous[T]) OnNext(x T)

OnNext implements rx.Observer.

Jump to

Keyboard shortcuts

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