#[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: SafeJSContext,
view: HeapBufferSource<ArrayBufferViewU8>,
options: &ReadableStreamBYOBReaderReadOptions,
read_into_request: &ReadIntoRequest,
can_gc: CanGc,
)
pub(crate) fn read( &self, cx: SafeJSContext, view: HeapBufferSource<ArrayBufferViewU8>, options: &ReadableStreamBYOBReaderReadOptions, read_into_request: &ReadIntoRequest, can_gc: CanGc, )
pub(crate) fn get_num_read_into_requests(&self) -> usize
pub(crate) fn remove_read_into_request(&self) -> ReadIntoRequest
Trait Implementations§
Source§impl DomObject for ReadableStreamBYOBReader
impl DomObject for ReadableStreamBYOBReader
Source§impl DomObjectWrap<DomTypeHolder> for ReadableStreamBYOBReader
impl DomObjectWrap<DomTypeHolder> for ReadableStreamBYOBReader
Source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::GenericBindings::ReadableStreamBYOBReaderBinding::ReadableStreamBYOBReader_Binding::Wrap::<dom::bindings::codegen::DomTypeHolder::DomTypeHolder> as for<'a, 'b> unsafe fn(script_bindings::script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::readablestreambyobreader::ReadableStreamBYOBReader>, script_bindings::script_runtime::CanGc) -> script_bindings::root::Root<script_bindings::root::Dom<dom::readablestreambyobreader::ReadableStreamBYOBReader>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::GenericBindings::ReadableStreamBYOBReaderBinding::ReadableStreamBYOBReader_Binding::Wrap::<dom::bindings::codegen::DomTypeHolder::DomTypeHolder> as for<'a, 'b> unsafe fn(script_bindings::script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::readablestreambyobreader::ReadableStreamBYOBReader>, script_bindings::script_runtime::CanGc) -> script_bindings::root::Root<script_bindings::root::Dom<dom::readablestreambyobreader::ReadableStreamBYOBReader>>}
Function pointer to the general wrap function type
Source§impl HasParent for ReadableStreamBYOBReader
impl HasParent for ReadableStreamBYOBReader
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,
view: CustomAutoRooterGuard<'_, ArrayBufferView>,
options: &ReadableStreamBYOBReaderReadOptions,
can_gc: CanGc,
) -> Rc<Promise>
fn Read( &self, view: CustomAutoRooterGuard<'_, ArrayBufferView>, options: &ReadableStreamBYOBReaderReadOptions, can_gc: CanGc, ) -> Rc<Promise>
Source§fn Cancel(
&self,
_cx: SafeJSContext,
reason: SafeHandleValue<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn Cancel( &self, _cx: SafeJSContext, reason: SafeHandleValue<'_>, can_gc: CanGc, ) -> 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,
reason: SafeHandleValue<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn reader_generic_cancel( &self, reason: SafeHandleValue<'_>, can_gc: CanGc, ) -> Rc<Promise>
fn generic_cancel( &self, global: &GlobalScope, reason: SafeHandleValue<'_>, can_gc: CanGc, ) -> Rc<Promise>
fn as_default_reader(&self) -> Option<&ReadableStreamDefaultReader>
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 !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<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§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