class ReadableStreamReader[+T] extends Object
See ¶3.4. Class ReadableStreamReader of whatwg streams spec.
The ReadableStreamReader class represents a readable stream reader designed to be vended [sic] by a ReadableStream instance.
The ReadableStreamReader constructor is generally not meant to be used directly; instead, a stream’s getReader() method should be used. This allows different classes of readable streams to vend different classes of readers without the consumer needing to know which goes with which.
- T
Type of the Chunks returned by the Stream
- Annotations
- @JSType() @native() @JSGlobal()
- Alphabetic
- By Inheritance
- ReadableStreamReader
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ReadableStreamReader(stream: ReadableStream[T])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cancel(reason: Any): Promise[Any]
See §3.4.4.2. cancel(reason) of whatwg Streams spec.
See §3.4.4.2. cancel(reason) of whatwg Streams spec.
If the reader is active, the cancel method behaves the same as that for the associated stream. When done, it automatically releases the lock.
//todo determine type of reason
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
closed: Promise[ReadableStreamReader[T]]
See §3.4.4.1. get closed of whatwg Streams spec.
See §3.4.4.1. get closed of whatwg Streams spec.
The closed getter returns a promise that will be fulfilled when the stream becomes closed or the reader’s lock is released, or rejected if the stream ever errors.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
read(): Promise[Chunk[T]]
See 3.4.4.3. read() of whatwg Stream spec.
See 3.4.4.3. read() of whatwg Stream spec.
The read method will return a promise that allows access to the next chunk from the stream’s internal queue, if available. If the chunk does become available, the promise will be fulfilled with an object of the form { value: theChunk, done: false }. If the stream becomes closed, the promise will be fulfilled with an object of the form { value: undefined, done: true }. If the stream becomes errored, the promise will be rejected with the relevant error. If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source.
-
def
releaseLock(): Unit
The releaseLock method releases the reader’s lock on the corresponding stream.
The releaseLock method releases the reader’s lock on the corresponding stream. After the lock is released, the reader is no longer active. If the associated stream is errored when the lock is released, the reader will appear errored in the same way from now on; otherwise, the reader will appear closed. A reader’s lock cannot be released while it still has a pending read request, i.e., if a promise returned by the reader’s read() method has not yet been settled. Attempting to do so will throw a TypeError and leave the reader locked to the stream.
throws scala.scalajs.js.TypeError
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()