Packages

t

org.scalajs.dom.experimental

WriteableStream

trait WriteableStream[-T] extends Object

¶4.2. Class WritableStream of whatwg Stream spec

todo: the constructor

T

Type of the Chunks to be written to the Stream

Annotations
@JSType() @native()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WriteableStream
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def abort(reason: Any): Unit

    The abort method signals that the producer can no longer successfully write to the stream and it should be immediately moved to an "errored" state, with any queued-up writes discarded.

    The abort method signals that the producer can no longer successfully write to the stream and it should be immediately moved to an "errored" state, with any queued-up writes discarded. This will also execute any abort mechanism of the underlying sink. see ¶4.2.4.4. abort(reason)

    reason

    spec specifies Any (!?)

  2. def close(): Promise[WriteableStream[T]]

    The close method signals that the producer is done writing chunks to the stream and wishes to move the stream to a "closed" state.

    The close method signals that the producer is done writing chunks to the stream and wishes to move the stream to a "closed" state. This queues an action to close the stream, such that once any currently queued-up writes complete, the close mechanism of the underlying sink will execute, releasing any held resources. In the meantime, the stream will be in a "closing" state.

    ¶4.2.4.5. close()

    returns

    a promise of this stream being closed

  3. val closed: Promise[WriteableStream[T]]

    The closed getter returns a promise that will be fulfilled when the stream becomes closed, or rejected if it ever errors.

    The closed getter returns a promise that will be fulfilled when the stream becomes closed, or rejected if it ever errors. see ¶4.2.4.1. get closed

  4. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  5. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  6. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  7. val ready: Promise[WriteableStream[T]]

    The ready getter returns a promise that will be fulfilled when the stream transitions away from the "waiting" state to any other state.

    The ready getter returns a promise that will be fulfilled when the stream transitions away from the "waiting" state to any other state. Once the stream transitions back to "waiting", the getter will return a new promise that stays pending until the next state transition. In essence, this promise gives a signal as to when any backpressure has let up (or that the stream has been closed or errored).

    see ¶4.2.4.2. get ready of whatwg streams spec.

  8. def state: WriteableState

    The state getter returns the state of the stream see ¶4.2.4.3. get state of whatwg streams spec

  9. def toLocaleString(): String
    Definition Classes
    Object
  10. def valueOf(): Any
    Definition Classes
    Object
  11. def write(chunk: Chunk[T]): Promise[Any]

    The write method adds a write to the stream’s internal queue, instructing the stream to write the given chunk of data to the underlying sink once all other pending writes have finished successfully .

    The write method adds a write to the stream’s internal queue, instructing the stream to write the given chunk of data to the underlying sink once all other pending writes have finished successfully . It returns a promise that will be fulfilled or rejected depending on the success or failure of writing the chunk to the underlying sink. The impact of enqueuing this chunk will be immediately reflected in the stream’s state property; in particular, if the internal queue is now full according to the stream’s queuing strategy, the stream will exert backpressure by changing its state to "waiting".

    see 4.2.4.6. write(chunk) of whatwg streams spec

    returns

    bblfish: not sure what the type of the promise returned is