Trait

org.scalajs.dom.experimental

ReadableStream

Related Doc: package experimental

Permalink

trait ReadableStream[+T] extends Object

defined at ¶2.1. Readable Streams of whatwg Streams spec.

T

Type of the Chunks returned by the Stream. Can't make it coveriant, due to T

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

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def cancel(reason: String): Promise[Any]

    Permalink

    The cancel method cancels the stream, signaling a loss of interest in the stream by a consumer.

    The cancel method cancels the stream, signaling a loss of interest in the stream by a consumer. The supplied reason argument will be given to the underlying source, which may or may not use it.

    reason

    the reason <- actually not what type this is

    returns

    a Promise, but not quite sure what it can contain

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def getReader(): ReadableStreamReader[T]

    Permalink

    See ¶3.2.4.3. getReader() of whatwg streams spec.

    See ¶3.2.4.3. getReader() of whatwg streams spec. Also see the example usage there.

    The getReader method creates a readable stream reader and locks the stream to the new reader. While the stream is locked, no other reader can be acquired until this one is released. The returned reader provides the ability to directly read individual chunks from the stream via the reader’s read method. This functionality is especially useful for creating abstractions that desire the ability to consume a stream in its entirety. By getting a reader for the stream, you can ensure nobodyA else can interleave reads with yours or cancel the stream, which would interfere with your abstraction.

    Note that if a stream becomes closed or errored, any reader it is locked to is automatically released.

    throws scala.scalajs.js.TypeError if not a readable stream

    returns

    a new ReadableStreamReader

  12. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  16. def locked: Boolean

    Permalink

    The locked getter returns whether or not the readable stream is locked to a reader.

    The locked getter returns whether or not the readable stream is locked to a reader.

    throws scala.scalajs.js.TypeError if the stream is not readable

  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. def pipeThrough[U](pair: Any, options: Any = js.undefined): ReadableStream[U]

    Permalink

    see §3.2.4.4. pipeThrough({ writable, readable }, options)

    see §3.2.4.4. pipeThrough({ writable, readable }, options)

    The pipeThrough method provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use . Piping a stream will generally lock it for the duration of the pipe, preventing any other consumer fromA acquiring a reader.

    This method is intentionally generic; it does not require that its this value be a ReadableStream object. It also does not require that its writable argument be a WritableStream instance, or that its readable argument be a ReadableStream instance.

    //todo: determine the type of options

  21. def pipeTo(dest: WriteableStream[T], options: Any = js.undefined): Unit

    Permalink

    See ¶3.2.4.5. pipeTo(dest, { preventClose, preventAbort, preventCancel } = {}) of whatwg Streams spec.

    See ¶3.2.4.5. pipeTo(dest, { preventClose, preventAbort, preventCancel } = {}) of whatwg Streams spec.

    The pipeTo method pipes this readable stream to a given writable stream. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.

    Piping a stream will generally lock it for the duration of the pipe, preventing any other consumer from acquiring a reader. This method is intentionally generic; it does not require that its this value be a ReadableStream object.

    //todo: determine the type of options

  22. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def tee(): Array[_ <: ReadableStream[T]]

    Permalink

    See ¶3.2.4.6. tee() of whatwg streams spec.

    See ¶3.2.4.6. tee() of whatwg streams spec.

    The tee method tees this readable stream, returning a two-element array containing the two resulting branches as new ReadableStream instances.

    Teeing a stream will lock it, preventing any other consumer from acquiring a reader. To cancel the stream, cancel both of the resulting branches; a composite cancellation reason will then be propagated to the stream’s underlying source.

    Note that the chunks seen in each branch will be the same object. If the chunks are not immutable, this could allow interference between the two branches. (Let us know if you think we should add an option to tee that creates structured clones of the chunks for each branch.)

  25. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped