MCPcopy Create free account
hub / github.com/ReactiveX/RxGo / Distinct

Method Distinct

observable_operator.go:744–751  ·  view source on GitHub ↗

Distinct suppresses duplicate items in the original Observable and returns a new Observable.

(apply Func, opts ...Option)

Source from the content-addressed store, hash-verified

742// Distinct suppresses duplicate items in the original Observable and returns
743// a new Observable.
744func (o *ObservableImpl) Distinct(apply Func, opts ...Option) Observable {
745 return observable(o.parent, o, func() operator {
746 return &distinctOperator{
747 apply: apply,
748 keyset: make(map[interface{}]interface{}),
749 }
750 }, false, false, opts...)
751}
752
753type distinctOperator struct {
754 apply Func

Callers

nothing calls this directly

Calls 1

observableFunction · 0.85

Tested by

no test coverage detected