WriteableStream.Rd
An abstraction for writing streaming data.
Data will be buffered in an internal queue before being written to the underlying sink
Events:
start
error
drain
backpressure
close
Other streams:
ReadableStream
,
TransformStream
streams::EventEmitter
-> WriteableStream
current_state
1
is_ready
1
is_locked
1
controller
1
desired_size
1
Inherited methods
streams::EventEmitter$emit()
streams::EventEmitter$event_names()
streams::EventEmitter$get_max_listeners()
streams::EventEmitter$listener_count()
streams::EventEmitter$off()
streams::EventEmitter$on()
streams::EventEmitter$once()
streams::EventEmitter$prepend_listener()
streams::EventEmitter$prepend_once_listener()
streams::EventEmitter$raw_listeners()
streams::EventEmitter$remove_all_listeners()
streams::EventEmitter$set_max_listeners()
new()
Create a new ReadableStream
WriteableStream$new(
start = NULL,
write = NULL,
flush = NULL,
abort = NULL,
queue_strategy = NULL
)
start
a function that is called once the stream enters the "started" state
write
a function that is called whenever the stream attempts to write to the underlying source
flush
a function that is called prior to the stream ending
abort
a function that is called to immediately abort the stream, dropping all unconsumed chunks in the process
queue_strategy
a QueueStrategy object, describing how chunks will be buffered by the stream