gossamer/writable_stream/default_controller

Types

A controller for a WritableStream’s underlying sink, passed to the Start, Write, Close, and Abort callbacks. Used to signal stream errors and access the abort signal.

See WritableStreamDefaultController on MDN.

pub type DefaultController

Values

pub fn error(
  controller: DefaultController,
  reason reason: a,
) -> Result(Nil, js_error.JsError)

Signals an error on the stream. Returns an error if the stream is already closed or errored.

pub fn signal(
  of controller: DefaultController,
) -> abort_signal.AbortSignal
Search Document