pub struct Constellation<STF, SWF> {
pub script_to_devtools_callback: OnceCell<Option<GenericCallback<ScriptToDevtoolsControlMsg>>>,
/* private fields */
}Expand description
The Constellation itself. In the servo browser, there is one
constellation, which maintains all of the browser global data.
In embedded applications, there may be more than one constellation,
which are independent of each other.
The constellation may be in a different process from the pipelines, and communicates using IPC.
It is parameterized over a LayoutThreadFactory and a
ScriptThreadFactory (which in practice are implemented by
LayoutThread in the layout crate, and ScriptThread in
the script crate). Script and layout communicate using a Message
type.
Fields§
§script_to_devtools_callback: OnceCell<Option<GenericCallback<ScriptToDevtoolsControlMsg>>>A (potentially) IPC-based channel to the developer tools, if enabled. This allows
EventLoops to send messages to then. Shared with all EventLoops.
Implementations§
Source§impl<STF, SWF> Constellation<STF, SWF>where
STF: ScriptThreadFactory,
SWF: ServiceWorkerManagerFactory,
impl<STF, SWF> Constellation<STF, SWF>where
STF: ScriptThreadFactory,
SWF: ServiceWorkerManagerFactory,
Sourcepub fn start(
embedder_to_constellation_receiver: Receiver<EmbedderToConstellationMessage>,
state: InitialConstellationState,
layout_factory: Arc<dyn LayoutFactory>,
random_pipeline_closure_probability: Option<f32>,
random_pipeline_closure_seed: Option<usize>,
hard_fail: bool,
)
pub fn start( embedder_to_constellation_receiver: Receiver<EmbedderToConstellationMessage>, state: InitialConstellationState, layout_factory: Arc<dyn LayoutFactory>, random_pipeline_closure_probability: Option<f32>, random_pipeline_closure_seed: Option<usize>, hard_fail: bool, )
Create a new constellation thread.
Auto Trait Implementations§
impl<STF, SWF> !Freeze for Constellation<STF, SWF>
impl<STF, SWF> !RefUnwindSafe for Constellation<STF, SWF>
impl<STF, SWF> !Send for Constellation<STF, SWF>
impl<STF, SWF> !Sync for Constellation<STF, SWF>
impl<STF, SWF> !UnwindSafe for Constellation<STF, SWF>
impl<STF, SWF> Unpin for Constellation<STF, SWF>
impl<STF, SWF> UnsafeUnpin for Constellation<STF, SWF>
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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