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

Method Map

optionalsingle.go:43–47  ·  view source on GitHub ↗

Map transforms the items emitted by an OptionalSingle by applying a function to each item.

(apply Func, opts ...Option)

Source from the content-addressed store, hash-verified

41
42// Map transforms the items emitted by an OptionalSingle by applying a function to each item.
43func (o *OptionalSingleImpl) Map(apply Func, opts ...Option) OptionalSingle {
44 return optionalSingle(o.parent, o, func() operator {
45 return &mapOperatorOptionalSingle{apply: apply}
46 }, false, true, opts...)
47}
48
49// Observe observes an OptionalSingle by returning its channel.
50func (o *OptionalSingleImpl) Observe(opts ...Option) <-chan Item {

Callers

nothing calls this directly

Calls 1

optionalSingleFunction · 0.85

Tested by

no test coverage detected