pub(crate) struct ManagedMessagePort {
dom_port: Dom<MessagePort>,
port_impl: Option<MessagePortImpl>,
pending: bool,
closed: bool,
cross_realm_transform_readable: Option<CrossRealmTransformReadable>,
cross_realm_transform_writable: Option<CrossRealmTransformWritable>,
}
Expand description
Data representing a message-port managed by this global.
Fields§
§dom_port: Dom<MessagePort>
The DOM port.
port_impl: Option<MessagePortImpl>
The logic and data backing the DOM port. The option is needed to take out the port-impl as part of its transferring steps, without having to worry about rooting the dom-port.
pending: bool
We keep ports pending when they are first transfer-received, and only add them, and ask the constellation to complete the transfer, in a subsequent task if the port hasn’t been re-transfered.
closed: bool
Has the port been closed? If closed, it can be dropped and later GC’ed.
cross_realm_transform_readable: Option<CrossRealmTransformReadable>
Note: it may seem strange to use a pair of options, versus for example an enum. But it looks like tranform streams will require both of those in their transfer. This will be resolved when we reach that point of the implementation. https://streams.spec.whatwg.org/#abstract-opdef-setupcrossrealmtransformreadable
cross_realm_transform_writable: Option<CrossRealmTransformWritable>
Trait Implementations§
Source§impl MallocSizeOf for ManagedMessagePort
impl MallocSizeOf for ManagedMessagePort
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Auto Trait Implementations§
impl Freeze for ManagedMessagePort
impl !RefUnwindSafe for ManagedMessagePort
impl !Send for ManagedMessagePort
impl !Sync for ManagedMessagePort
impl Unpin for ManagedMessagePort
impl !UnwindSafe for ManagedMessagePort
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
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>
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>
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>
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 more