Skip to main content

ReadableStreamDefaultReaderMethods

pub trait ReadableStreamDefaultReaderMethods<D: DomTypes> {
    // Required methods
    fn Read(
        &self,
        cx: &mut JSContext,
    ) -> <D::Promise as PromiseHelpers<D>>::StackRoot;
    fn ReleaseLock(&self, cx: &mut JSContext) -> Fallible<()>;
    fn Closed(
        &self,
        cx: &JSContext,
    ) -> <D::Promise as PromiseHelpers<D>>::StackRoot;
    fn Cancel(
        &self,
        cx: &mut JSContext,
        reason: HandleValue<'_>,
    ) -> <D::Promise as PromiseHelpers<D>>::StackRoot;
    fn Constructor(
        cx: &mut JSContext,
        global: &D::GlobalScope,
        proto: Option<HandleObject<'_>>,
        stream: &D::ReadableStream,
    ) -> Fallible<DomRoot<D::ReadableStreamDefaultReader>>;
}

Required Methods§

Source

fn Read( &self, cx: &mut JSContext, ) -> <D::Promise as PromiseHelpers<D>>::StackRoot

Source

fn ReleaseLock(&self, cx: &mut JSContext) -> Fallible<()>

Source

fn Closed(&self, cx: &JSContext) -> <D::Promise as PromiseHelpers<D>>::StackRoot

Source

fn Cancel( &self, cx: &mut JSContext, reason: HandleValue<'_>, ) -> <D::Promise as PromiseHelpers<D>>::StackRoot

Source

fn Constructor( cx: &mut JSContext, global: &D::GlobalScope, proto: Option<HandleObject<'_>>, stream: &D::ReadableStream, ) -> Fallible<DomRoot<D::ReadableStreamDefaultReader>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§