#[repr(C)]pub(crate) struct ReadableStreamBYOBReader {
reflector_: Reflector,
stream: MutNullableDom<ReadableStream>,
read_into_requests: DomRefCell<VecDeque<ReadIntoRequest>>,
closed_promise: DomRefCell<Rc<Promise>>,
}Expand description
Fields§
§reflector_: Reflector§stream: MutNullableDom<ReadableStream>§read_into_requests: DomRefCell<VecDeque<ReadIntoRequest>>§closed_promise: DomRefCell<Rc<Promise>>Implementations§
Source§impl ReadableStreamBYOBReader
impl ReadableStreamBYOBReader
fn __assert_parent_type(&self)
Source§impl ReadableStreamBYOBReader
impl ReadableStreamBYOBReader
fn new_with_proto( global: &GlobalScope, proto: Option<SafeHandleObject<'_>>, can_gc: CanGc, ) -> DomRoot<ReadableStreamBYOBReader>
fn new_inherited( global: &GlobalScope, can_gc: CanGc, ) -> ReadableStreamBYOBReader
pub(crate) fn new( global: &GlobalScope, can_gc: CanGc, ) -> DomRoot<ReadableStreamBYOBReader>
Sourcepub(crate) fn set_up(
&self,
stream: &ReadableStream,
global: &GlobalScope,
can_gc: CanGc,
) -> Fallible<()>
pub(crate) fn set_up( &self, stream: &ReadableStream, global: &GlobalScope, can_gc: CanGc, ) -> Fallible<()>
Sourcepub(crate) fn error_read_into_requests(
&self,
e: SafeHandleValue<'_>,
can_gc: CanGc,
)
pub(crate) fn error_read_into_requests( &self, e: SafeHandleValue<'_>, can_gc: CanGc, )
fn take_read_into_requests(&self) -> VecDeque<ReadIntoRequest>
Sourcepub(crate) fn add_read_into_request(&self, read_request: &ReadIntoRequest)
pub(crate) fn add_read_into_request(&self, read_request: &ReadIntoRequest)
pub(crate) fn close(&self, can_gc: CanGc)
Sourcepub(crate) fn read(
&self,
cx: &mut JSContext,
view: &HeapBufferSource<ArrayBufferViewU8>,
min: u64,
read_into_request: &ReadIntoRequest,
)
pub(crate) fn read( &self, cx: &mut JSContext, view: &HeapBufferSource<ArrayBufferViewU8>, min: u64, read_into_request: &ReadIntoRequest, )
pub(crate) fn get_num_read_into_requests(&self) -> usize
pub(crate) fn remove_read_into_request(&self) -> ReadIntoRequest
pub(crate) fn byte_tee_append_native_handler_to_closed_promise( &self, cx: &mut JSContext, branch_1: &ReadableStream, branch_2: &ReadableStream, canceled_1: Rc<Cell<bool>>, canceled_2: Rc<Cell<bool>>, cancel_promise: Rc<Promise>, reader_version: Rc<Cell<u64>>, expected_version: u64, )
Trait Implementations§
Source§impl DomObject for ReadableStreamBYOBReader
impl DomObject for ReadableStreamBYOBReader
type ReflectorType = ()
Source§fn reflector(&self) -> &Reflector<Self::ReflectorType>
fn reflector(&self) -> &Reflector<Self::ReflectorType>
Returns the receiver’s reflector.
Source§impl Drop for ReadableStreamBYOBReader
impl Drop for ReadableStreamBYOBReader
Source§impl HasParent for ReadableStreamBYOBReader
impl HasParent for ReadableStreamBYOBReader
Source§impl IDLInterface for ReadableStreamBYOBReader
impl IDLInterface for ReadableStreamBYOBReader
Source§const PROTO_FIRST: u16 = 444
const PROTO_FIRST: u16 = 444
First prototype ID in the DFS-ordered range for this interface and its descendants.
Source§const PROTO_LAST: u16 = 444
const PROTO_LAST: u16 = 444
Last prototype ID in the DFS-ordered range for this interface and its descendants.
Source§impl MallocSizeOf for ReadableStreamBYOBReader
impl MallocSizeOf for ReadableStreamBYOBReader
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl PartialEq for ReadableStreamBYOBReader
impl PartialEq for ReadableStreamBYOBReader
Source§impl ReadableStreamBYOBReaderMethods<DomTypeHolder> for ReadableStreamBYOBReader
impl ReadableStreamBYOBReaderMethods<DomTypeHolder> for ReadableStreamBYOBReader
Source§fn Constructor(
global: &GlobalScope,
proto: Option<SafeHandleObject<'_>>,
can_gc: CanGc,
stream: &ReadableStream,
) -> Fallible<DomRoot<Self>>
fn Constructor( global: &GlobalScope, proto: Option<SafeHandleObject<'_>>, can_gc: CanGc, stream: &ReadableStream, ) -> Fallible<DomRoot<Self>>
Source§fn Read(
&self,
cx: &mut JSContext,
view: CustomAutoRooterGuard<'_, ArrayBufferView>,
options: &ReadableStreamBYOBReaderReadOptions,
) -> Rc<Promise>
fn Read( &self, cx: &mut JSContext, view: CustomAutoRooterGuard<'_, ArrayBufferView>, options: &ReadableStreamBYOBReaderReadOptions, ) -> Rc<Promise>
Source§impl ReadableStreamGenericReader for ReadableStreamBYOBReader
impl ReadableStreamGenericReader for ReadableStreamBYOBReader
fn get_closed_promise(&self) -> Rc<Promise>
fn set_closed_promise(&self, promise: Rc<Promise>)
fn set_stream(&self, stream: Option<&ReadableStream>)
fn get_stream(&self) -> Option<DomRoot<ReadableStream>>
fn as_byob_reader(&self) -> Option<&ReadableStreamBYOBReader>
Source§fn generic_initialize(
&self,
global: &GlobalScope,
stream: &ReadableStream,
can_gc: CanGc,
)
fn generic_initialize( &self, global: &GlobalScope, stream: &ReadableStream, can_gc: CanGc, )
Source§fn reader_generic_cancel(
&self,
cx: &mut JSContext,
global: &GlobalScope,
reason: SafeHandleValue<'_>,
) -> Rc<Promise>
fn reader_generic_cancel( &self, cx: &mut JSContext, global: &GlobalScope, reason: SafeHandleValue<'_>, ) -> Rc<Promise>
fn generic_cancel( &self, cx: &mut JSContext, global: &GlobalScope, reason: SafeHandleValue<'_>, ) -> Rc<Promise>
fn as_default_reader(&self) -> Option<&ReadableStreamDefaultReader>
Source§impl ToJSValConvertible for ReadableStreamBYOBReader
impl ToJSValConvertible for ReadableStreamBYOBReader
Source§unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)
unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)
Convert
self to a JSVal. JSAPI failure causes a panic.Source§fn safe_to_jsval(&self, cx: &mut JSContext, rval: MutableHandle<'_, Value>)
fn safe_to_jsval(&self, cx: &mut JSContext, rval: MutableHandle<'_, Value>)
Convert
self to a JSVal. JSAPI failure causes a panic.Source§impl Traceable for ReadableStreamBYOBReader
impl Traceable for ReadableStreamBYOBReader
impl Eq for ReadableStreamBYOBReader
Auto Trait Implementations§
impl !Freeze for ReadableStreamBYOBReader
impl !RefUnwindSafe for ReadableStreamBYOBReader
impl !Send for ReadableStreamBYOBReader
impl !Sync for ReadableStreamBYOBReader
impl Unpin for ReadableStreamBYOBReader
impl UnsafeUnpin for ReadableStreamBYOBReader
impl !UnwindSafe for ReadableStreamBYOBReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<D, T> DomGlobalGeneric<D> for T
impl<D, T> DomGlobalGeneric<D> for T
Source§fn global_(&self, realm: InRealm<'_>) -> Root<Dom<<D as DomTypes>::GlobalScope>>where
Self: Sized,
fn global_(&self, realm: InRealm<'_>) -> Root<Dom<<D as DomTypes>::GlobalScope>>where
Self: Sized,
Returns the [
GlobalScope] of the realm that the DomObject was created in. If this
object is a Node, this will be different from it’s owning Document if adopted by. For
Nodes it’s almost always better to use NodeTraits::owning_global.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert