Trait script::dom::bindings::codegen::Bindings::ReadableStreamBinding::ReadableStream_Binding::ReadableStreamMethods
source · pub trait ReadableStreamMethods<D: DomTypes> {
// Required methods
fn Locked(&self) -> bool;
fn Cancel(
&self,
cx: SafeJSContext,
reason: HandleValue<'_>,
_can_gc: CanGc,
) -> Rc<Promise>;
fn GetReader(
&self,
options: &ReadableStreamGetReaderOptions,
_can_gc: CanGc,
) -> Result<ReadableStreamDefaultReaderOrReadableStreamBYOBReader, Error>;
fn Tee(
&self,
_can_gc: CanGc,
) -> Result<Vec<Root<Dom<ReadableStream>>>, Error>;
fn Constructor(
cx: SafeJSContext,
global: &GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
underlyingSource: Option<*mut JSObject>,
strategy: &QueuingStrategy,
) -> Result<Root<Dom<ReadableStream>>, Error>;
}
Required Methods§
fn Locked(&self) -> bool
fn Cancel( &self, cx: SafeJSContext, reason: HandleValue<'_>, _can_gc: CanGc, ) -> Rc<Promise>
fn GetReader( &self, options: &ReadableStreamGetReaderOptions, _can_gc: CanGc, ) -> Result<ReadableStreamDefaultReaderOrReadableStreamBYOBReader, Error>
fn Tee(&self, _can_gc: CanGc) -> Result<Vec<Root<Dom<ReadableStream>>>, Error>
fn Constructor( cx: SafeJSContext, global: &GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, underlyingSource: Option<*mut JSObject>, strategy: &QueuingStrategy, ) -> Result<Root<Dom<ReadableStream>>, Error>
Object Safety§
This trait is not object safe.