#[repr(C)]pub struct TransformStream {
reflector_: Reflector,
backpressure: Cell<bool>,
backpressure_change_promise: DomRefCell<Option<Rc<Promise>>>,
controller: MutNullableDom<TransformStreamDefaultController>,
detached: Cell<bool>,
readable: MutNullableDom<ReadableStream>,
writable: MutNullableDom<WritableStream>,
}
Expand description
Fields§
§reflector_: Reflector
§backpressure: Cell<bool>
§backpressure_change_promise: DomRefCell<Option<Rc<Promise>>>
§controller: MutNullableDom<TransformStreamDefaultController>
§detached: Cell<bool>
§readable: MutNullableDom<ReadableStream>
§writable: MutNullableDom<WritableStream>
Implementations§
Source§impl TransformStream
impl TransformStream
fn __assert_parent_type(&self)
Source§impl TransformStream
impl TransformStream
Sourcefn new_inherited() -> TransformStream
fn new_inherited() -> TransformStream
pub(crate) fn new_with_proto( global: &GlobalScope, proto: Option<SafeHandleObject<'_>>, can_gc: CanGc, ) -> DomRoot<TransformStream>
Sourcepub(crate) fn set_up(
&self,
cx: SafeJSContext,
global: &GlobalScope,
transformer_type: TransformerType,
can_gc: CanGc,
) -> Fallible<()>
pub(crate) fn set_up( &self, cx: SafeJSContext, global: &GlobalScope, transformer_type: TransformerType, can_gc: CanGc, ) -> Fallible<()>
Creates and set up the newly created transform stream following https://streams.spec.whatwg.org/#transformstream-set-up
pub(crate) fn get_controller(&self) -> DomRoot<TransformStreamDefaultController>
pub(crate) fn get_writable(&self) -> DomRoot<WritableStream>
pub(crate) fn get_readable(&self) -> DomRoot<ReadableStream>
pub(crate) fn get_backpressure(&self) -> bool
Sourcefn initialize(
&self,
cx: SafeJSContext,
global: &GlobalScope,
start_promise: Rc<Promise>,
writable_high_water_mark: f64,
writable_size_algorithm: Rc<QueuingStrategySize<DomTypeHolder>>,
readable_high_water_mark: f64,
readable_size_algorithm: Rc<QueuingStrategySize<DomTypeHolder>>,
can_gc: CanGc,
) -> Fallible<()>
fn initialize( &self, cx: SafeJSContext, global: &GlobalScope, start_promise: Rc<Promise>, writable_high_water_mark: f64, writable_size_algorithm: Rc<QueuingStrategySize<DomTypeHolder>>, readable_high_water_mark: f64, readable_size_algorithm: Rc<QueuingStrategySize<DomTypeHolder>>, can_gc: CanGc, ) -> Fallible<()>
Sourcepub(crate) fn set_backpressure(
&self,
global: &GlobalScope,
backpressure: bool,
can_gc: CanGc,
)
pub(crate) fn set_backpressure( &self, global: &GlobalScope, backpressure: bool, can_gc: CanGc, )
Sourcefn set_up_transform_stream_default_controller(
&self,
controller: &TransformStreamDefaultController,
)
fn set_up_transform_stream_default_controller( &self, controller: &TransformStreamDefaultController, )
Sourcefn set_up_transform_stream_default_controller_from_transformer(
&self,
global: &GlobalScope,
transformer_obj: SafeHandleObject<'_>,
transformer: &Transformer<DomTypeHolder>,
can_gc: CanGc,
)
fn set_up_transform_stream_default_controller_from_transformer( &self, global: &GlobalScope, transformer_obj: SafeHandleObject<'_>, transformer: &Transformer<DomTypeHolder>, can_gc: CanGc, )
Sourcepub(crate) fn transform_stream_default_sink_write_algorithm(
&self,
cx: SafeJSContext,
global: &GlobalScope,
chunk: SafeHandleValue<'_>,
can_gc: CanGc,
) -> Fallible<Rc<Promise>>
pub(crate) fn transform_stream_default_sink_write_algorithm( &self, cx: SafeJSContext, global: &GlobalScope, chunk: SafeHandleValue<'_>, can_gc: CanGc, ) -> Fallible<Rc<Promise>>
Sourcepub(crate) fn transform_stream_default_sink_abort_algorithm(
&self,
cx: SafeJSContext,
global: &GlobalScope,
reason: SafeHandleValue<'_>,
can_gc: CanGc,
) -> Fallible<Rc<Promise>>
pub(crate) fn transform_stream_default_sink_abort_algorithm( &self, cx: SafeJSContext, global: &GlobalScope, reason: SafeHandleValue<'_>, can_gc: CanGc, ) -> Fallible<Rc<Promise>>
Sourcepub(crate) fn transform_stream_default_sink_close_algorithm(
&self,
cx: SafeJSContext,
global: &GlobalScope,
can_gc: CanGc,
) -> Fallible<Rc<Promise>>
pub(crate) fn transform_stream_default_sink_close_algorithm( &self, cx: SafeJSContext, global: &GlobalScope, can_gc: CanGc, ) -> Fallible<Rc<Promise>>
Sourcepub(crate) fn transform_stream_default_source_cancel(
&self,
cx: SafeJSContext,
global: &GlobalScope,
reason: SafeHandleValue<'_>,
can_gc: CanGc,
) -> Fallible<Rc<Promise>>
pub(crate) fn transform_stream_default_source_cancel( &self, cx: SafeJSContext, global: &GlobalScope, reason: SafeHandleValue<'_>, can_gc: CanGc, ) -> Fallible<Rc<Promise>>
Sourcepub(crate) fn transform_stream_default_source_pull(
&self,
global: &GlobalScope,
can_gc: CanGc,
) -> Fallible<Rc<Promise>>
pub(crate) fn transform_stream_default_source_pull( &self, global: &GlobalScope, can_gc: CanGc, ) -> Fallible<Rc<Promise>>
Sourcepub(crate) fn error_writable_and_unblock_write(
&self,
cx: SafeJSContext,
global: &GlobalScope,
error: SafeHandleValue<'_>,
can_gc: CanGc,
)
pub(crate) fn error_writable_and_unblock_write( &self, cx: SafeJSContext, global: &GlobalScope, error: SafeHandleValue<'_>, can_gc: CanGc, )
Sourcepub(crate) fn unblock_write(&self, global: &GlobalScope, can_gc: CanGc)
pub(crate) fn unblock_write(&self, global: &GlobalScope, can_gc: CanGc)
Sourcepub(crate) fn error(
&self,
cx: SafeJSContext,
global: &GlobalScope,
error: SafeHandleValue<'_>,
can_gc: CanGc,
)
pub(crate) fn error( &self, cx: SafeJSContext, global: &GlobalScope, error: SafeHandleValue<'_>, can_gc: CanGc, )
Trait Implementations§
Source§impl DomObject for TransformStream
impl DomObject for TransformStream
Source§impl DomObjectWrap<DomTypeHolder> for TransformStream
impl DomObjectWrap<DomTypeHolder> for TransformStream
Source§const WRAP: unsafe fn(SafeJSContext, &GlobalScope, Option<HandleObject<'_>>, Box<Self>, CanGc) -> Root<Dom<Self>> = {script_bindings::codegen::GenericBindings::TransformStreamBinding::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::transformstream::TransformStream>, script_bindings::script_runtime::CanGc) -> script_bindings::root::Root<script_bindings::root::Dom<dom::transformstream::TransformStream>>}
const WRAP: unsafe fn(SafeJSContext, &GlobalScope, Option<HandleObject<'_>>, Box<Self>, CanGc) -> Root<Dom<Self>> = {script_bindings::codegen::GenericBindings::TransformStreamBinding::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::transformstream::TransformStream>, script_bindings::script_runtime::CanGc) -> script_bindings::root::Root<script_bindings::root::Dom<dom::transformstream::TransformStream>>}
Function pointer to the general wrap function type
Source§impl HasParent for TransformStream
impl HasParent for TransformStream
Source§impl IDLInterface for TransformStream
impl IDLInterface for TransformStream
Source§impl MallocSizeOf for TransformStream
impl MallocSizeOf for TransformStream
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 MarkedAsTransferableInIdl for TransformStream
impl MarkedAsTransferableInIdl for TransformStream
Source§fn assert_transferable()
fn assert_transferable()
Used to define compile-time assertions about the type implementing this trait.
Source§impl MutDomObject for TransformStream
impl MutDomObject for TransformStream
Source§impl PartialEq for TransformStream
impl PartialEq for TransformStream
Source§impl ToJSValConvertible for TransformStream
impl ToJSValConvertible for TransformStream
Source§impl Traceable for TransformStream
impl Traceable for TransformStream
Source§impl Transferable for TransformStream
impl Transferable for TransformStream
Source§fn transfer(&self) -> Fallible<(MessagePortId, TransformStreamData)>
fn transfer(&self) -> Fallible<(MessagePortId, TransformStreamData)>
Source§fn transfer_receive(
owner: &GlobalScope,
_id: MessagePortId,
data: TransformStreamData,
) -> Result<DomRoot<Self>, ()>
fn transfer_receive( owner: &GlobalScope, _id: MessagePortId, data: TransformStreamData, ) -> Result<DomRoot<Self>, ()>
type Index = MessagePortIndex
type Data = TransformStreamData
fn serialized_storage<'a>( data: StructuredData<'a, '_>, ) -> &'a mut Option<HashMap<MessagePortId, Self::Data>>
fn can_transfer(&self) -> bool
Source§impl TransformStreamMethods<DomTypeHolder> for TransformStream
impl TransformStreamMethods<DomTypeHolder> for TransformStream
Source§fn Constructor(
cx: SafeJSContext,
global: &GlobalScope,
proto: Option<SafeHandleObject<'_>>,
can_gc: CanGc,
transformer: Option<*mut JSObject>,
writable_strategy: &QueuingStrategy<DomTypeHolder>,
readable_strategy: &QueuingStrategy<DomTypeHolder>,
) -> Fallible<DomRoot<TransformStream>>
fn Constructor( cx: SafeJSContext, global: &GlobalScope, proto: Option<SafeHandleObject<'_>>, can_gc: CanGc, transformer: Option<*mut JSObject>, writable_strategy: &QueuingStrategy<DomTypeHolder>, readable_strategy: &QueuingStrategy<DomTypeHolder>, ) -> Fallible<DomRoot<TransformStream>>
impl Eq for TransformStream
Auto Trait Implementations§
impl !Freeze for TransformStream
impl !RefUnwindSafe for TransformStream
impl !Send for TransformStream
impl !Sync for TransformStream
impl Unpin for TransformStream
impl !UnwindSafe for TransformStream
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
Node
s 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