gossamer/readable_stream

Types

pub type ReadableStream(a)

Values

pub fn async_iterator(
  stream: ReadableStream(a),
) -> async_iterator.AsyncIterator(a, Nil, Nil)
pub fn cancel(
  stream: ReadableStream(a),
  reason: r,
) -> promise.Promise(Nil)
pub fn from(iterable: a) -> ReadableStream(b)

Creates a ReadableStream from an iterable or async iterable.

Note: Not available on Bun. See https://github.com/oven-sh/bun/issues/3700

pub fn from_start(
  start: fn(default_controller.DefaultController(a)) -> Nil,
) -> ReadableStream(a)
pub fn get_byob_reader(
  stream: ReadableStream(a),
) -> byob_reader.ByobReader(a)
pub fn get_reader(stream: ReadableStream(a)) -> reader.Reader(a)
pub fn is_locked(stream: ReadableStream(a)) -> Bool
pub fn new(
  source: List(underlying_source.UnderlyingSource(a)),
) -> ReadableStream(a)
pub fn pipe_through(
  stream: ReadableStream(a),
  transform: #(
    ReadableStream(b),
    writable_stream.WritableStream(a),
  ),
  options: List(stream_pipe_option.StreamPipeOption),
) -> ReadableStream(b)
pub fn pipe_to(
  stream: ReadableStream(a),
  destination: writable_stream.WritableStream(a),
  options: List(stream_pipe_option.StreamPipeOption),
) -> promise.Promise(Nil)
pub fn tee(
  stream: ReadableStream(a),
) -> #(ReadableStream(a), ReadableStream(a))
Search Document