pub struct InitialScriptState {Show 19 fields
pub id: ScriptEventLoopId,
pub namespace_request_sender: GenericSender<PipelineNamespaceRequest>,
pub constellation_to_script_sender: GenericSender<ScriptThreadMessage>,
pub constellation_to_script_receiver: GenericReceiver<ScriptThreadMessage>,
pub script_to_constellation_sender: ScriptToConstellationSender,
pub script_to_embedder_sender: ScriptToEmbedderChan,
pub system_font_service: SystemFontServiceProxySender,
pub resource_threads: ResourceThreads,
pub storage_threads: StorageThreads,
pub time_profiler_sender: ProfilerChan,
pub memory_profiler_sender: ProfilerChan,
pub devtools_server_sender: Option<GenericCallback<ScriptToDevtoolsControlMsg>>,
pub pipeline_namespace_id: PipelineNamespaceId,
pub webgl_chan: Option<WebGLPipeline>,
pub webxr_registry: Option<Registry>,
pub cross_process_paint_api: CrossProcessPaintApi,
pub player_context: WindowGLContext,
pub privileged_urls: Vec<ServoUrl>,
pub user_contents_for_manager_id: FxHashMap<UserContentManagerId, UserContents>,
}Expand description
All of the information necessary to create a new [ScriptThread] for a new [EventLoop].
NB: DO NOT add any Senders or Receivers here! pcwalton will have to rewrite your code if you do! Use IPC senders and receivers instead.
Fields§
§id: ScriptEventLoopIdThe id of the script event loop that this state will start. This is used to uniquely identify an event loop.
namespace_request_sender: GenericSender<PipelineNamespaceRequest>The sender to use to install the Pipeline namespace into this process (if necessary).
constellation_to_script_sender: GenericSender<ScriptThreadMessage>A channel with which messages can be sent to us (the script thread).
constellation_to_script_receiver: GenericReceiver<ScriptThreadMessage>A port on which messages sent by the constellation to script can be received.
script_to_constellation_sender: ScriptToConstellationSenderA channel on which messages can be sent to the constellation from script.
script_to_embedder_sender: ScriptToEmbedderChanA channel which allows script to send messages directly to the Embedder This will pump the embedder event loop.
system_font_service: SystemFontServiceProxySenderAn IpcSender to the SystemFontService used to create a SystemFontServiceProxy.
resource_threads: ResourceThreadsA channel to the resource manager thread.
storage_threads: StorageThreadsA channel to the storage manager thread.
time_profiler_sender: ProfilerChanA channel to the time profiler thread.
memory_profiler_sender: ProfilerChanA channel to the memory profiler thread.
devtools_server_sender: Option<GenericCallback<ScriptToDevtoolsControlMsg>>A channel to the developer tools, if applicable.
pipeline_namespace_id: PipelineNamespaceIdThe ID of the pipeline namespace for this script thread.
webgl_chan: Option<WebGLPipeline>A channel to the WebGL thread used in this pipeline.
webxr_registry: Option<Registry>The XR device registry
cross_process_paint_api: CrossProcessPaintApiAccess to Paint across a process boundary.
player_context: WindowGLContextApplication window’s GL Context for Media player
privileged_urls: Vec<ServoUrl>A list of URLs that can access privileged internal APIs.
user_contents_for_manager_id: FxHashMap<UserContentManagerId, UserContents>A copy of constellation’s UserContentManagerId to UserContents map.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for InitialScriptState
impl<'de> Deserialize<'de> for InitialScriptState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl !Freeze for InitialScriptState
impl !RefUnwindSafe for InitialScriptState
impl Send for InitialScriptState
impl !Sync for InitialScriptState
impl Unpin for InitialScriptState
impl UnsafeUnpin for InitialScriptState
impl !UnwindSafe for InitialScriptState
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> 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