class EventStream
Stream of momentary events.
index
members
-
eventstream:dirty()
– return whether this stream was changed in the current tick. -
eventstream:add(event)
– push an event value into the stream. -
eventstream:unwrap([type[, msg]])
– get the sequence of current events (if any). -
eventstream:fork()
– create a mutable copy of this stream. -
eventstream:__call(...)
– alias for unwrap. -
eventstream.metatype()
– Stream metatype. -
eventstream.meta
– documentation metadata.
static functions
-
EventStream(type)
– construct a new EventStream.
details
members
-
– return whether this stream was changed in the current tick.
returns:
- (bool)
-
– push an event value into the stream.
Marks this stream as dirty for the remainder of the current tick.
parameters:
- – get the sequence of current events (if any).
-
– create a mutable copy of this stream.
Used to wrap insulate eval-cycles from each other.
returns:
-
– alias for unwrap.
parameters:
-
– Stream metatype.
-
– documentation metadata.
an optional table containing metadata for error messages and documentation. The following keys are recognized:
name
: optional namesummary
: single-line description (markdown)examples
: optional list of single-line code examplesdescription
: optional full-text description (markdown)
static functions
-
– construct a new EventStream.
parameters:
- the type name