class EvtStream
Stream of momentary events.
index
members
-
evtstream\set(event, force)
– push an event value into the stream. -
evtstream.value
– the wrapped Lua value.
static functions
-
EvtStream\new(type)
– construct a new EvtStream.
result interface
-
evtstream\dirty()
– return whether this Result was changed in the current tick. -
evtstream\unwrap([type[, msg]])
– get the sequence of current events (if any). -
evtstream\fork()
– create a mutable copy of this stream. -
evtstream\__call(...)
– alias for unwrap. -
evtstream.type
– the type of this Result's value. -
evtstream.metatype()
– the metatype string for this Result.
details
members
-
– push an event value into the stream.
Marks this stream as dirty for the remainder of the current tick. If event is nil, does nothing.
parameters:
-
– the wrapped Lua value.
static functions
-
– construct a new EvtStream.
parameters:
- the type
result interface
-
– return whether this Result was changed in the current tick.
returns:
- (bool)
-
– get the sequence of current events (if any).
Returns value if dirty, or nil otherwise. Asserts @type == type if type is given.
parameters:
- the type to check for (optional)
- message to throw if type don't match (optional)
returns:
- (optional any): value
-
– create a mutable copy of this stream.
Used to wrap insulate eval-cycles from each other.
returns:
-
– alias for unwrap.
parameters:
-
– the type of this Result's value.
-
– the metatype string for this Result.