#cp.rx.Reference

A handle representing the link between an Observer and an Observable, as well as any work required to clean up after the Observable completes or the Observer cancels.


#API Overview

Constructors - API calls which return an object, typically one that offers API methods

Methods - API calls which can only be made on an object returned by a constructor


#API Documentation

#Constructors

Signaturecp.rx.Reference.create(action) -> cp.rx.Reference
TypeConstructor
DescriptionCreates a new Reference.
Parameters
  • action - The action to run when the reference is canceld. It will only be run once.
Returns
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/rx/Reference.lua line 15

#Methods

Signaturecp.rx.Reference:cancel() -> nil
TypeMethod
DescriptionUnsubscribes the reference, performing any necessary cleanup work.
Parameters
  • None
Returns
  • Nothing
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/rx/Reference.lua line 33