Struct servo_config::opts::Opts
source · pub struct Opts {Show 32 fields
pub legacy_layout: bool,
pub tile_size: usize,
pub time_profiling: Option<OutputOptions>,
pub time_profiler_trace_path: Option<String>,
pub mem_profiler_period: Option<f64>,
pub nonincremental_layout: bool,
pub userscripts: Option<String>,
pub user_stylesheets: Vec<(Vec<u8>, ServoUrl)>,
pub output_file: Option<String>,
pub headless: bool,
pub hard_fail: bool,
pub debug: DebugOptions,
pub devtools_port: u16,
pub devtools_server_enabled: bool,
pub webdriver_port: Option<u16>,
pub initial_window_size: Size2D<u32, DeviceIndependentPixel>,
pub screen_size_override: Option<Size2D<u32, DeviceIndependentPixel>>,
pub multiprocess: bool,
pub background_hang_monitor: bool,
pub sandbox: bool,
pub random_pipeline_closure_probability: Option<f32>,
pub random_pipeline_closure_seed: Option<usize>,
pub exit_after_load: bool,
pub shaders_dir: Option<PathBuf>,
pub config_dir: Option<PathBuf>,
pub is_printing_version: bool,
pub certificate_path: Option<String>,
pub ignore_certificate_errors: bool,
pub unminify_js: bool,
pub local_script_source: Option<String>,
pub unminify_css: bool,
pub print_pwm: bool,
}
Expand description
Global flags for Servo, currently set on the command line.
Fields§
§legacy_layout: bool
Whether or not the legacy layout system is enabled.
tile_size: usize
The maximum size of each tile in pixels (-s
).
time_profiling: Option<OutputOptions>
None
to disable the time profiler or Some
to enable it with:
- an interval in seconds to cause it to produce output on that interval.
(
i.e. -p 5
). - a file path to write profiling info to a TSV file upon Servo’s termination.
(
i.e. -p out.tsv
).
time_profiler_trace_path: Option<String>
When the profiler is enabled, this is an optional path to dump a self-contained HTML file visualizing the traces as a timeline.
mem_profiler_period: Option<f64>
None
to disable the memory profiler or Some
with an interval in seconds to enable it
and cause it to produce output on that interval (-m
).
nonincremental_layout: bool
True to turn off incremental layout.
userscripts: Option<String>
Where to load userscripts from, if any. An empty string will load from the resources/user-agent-js directory, and if the option isn’t passed userscripts won’t be loaded
user_stylesheets: Vec<(Vec<u8>, ServoUrl)>
§output_file: Option<String>
§headless: bool
§hard_fail: bool
True to exit on thread failure instead of displaying about:failure.
debug: DebugOptions
Debug options that are used by developers to control Servo behavior for debugging purposes.
devtools_port: u16
Port number to start a server to listen to remote Firefox devtools connections. 0 for random port.
devtools_server_enabled: bool
Start the devtools server at startup
webdriver_port: Option<u16>
None
to disable WebDriver or Some
with a port number to start a server to listen to
remote WebDriver commands.
initial_window_size: Size2D<u32, DeviceIndependentPixel>
The initial requested size of the window.
screen_size_override: Option<Size2D<u32, DeviceIndependentPixel>>
An override for the screen resolution. This is useful for testing behavior on different screen sizes, such as the screen of a mobile device.
multiprocess: bool
Whether we’re running in multiprocess mode.
background_hang_monitor: bool
Whether we want background hang monitor enabled or not
sandbox: bool
Whether we’re running inside the sandbox.
random_pipeline_closure_probability: Option<f32>
Probability of randomly closing a pipeline, used for testing the hardening of the constellation.
random_pipeline_closure_seed: Option<usize>
The seed for the RNG used to randomly close pipelines, used for testing the hardening of the constellation.
exit_after_load: bool
True to exit after the page load (-x
).
shaders_dir: Option<PathBuf>
Load shaders from disk.
config_dir: Option<PathBuf>
Directory for a default config directory
is_printing_version: bool
Print the version and exit.
certificate_path: Option<String>
Path to PEM encoded SSL CA certificate store.
ignore_certificate_errors: bool
Whether or not to completely ignore SSL certificate validation errors. TODO: We should see if we can eliminate the need for this by fixing https://github.com/servo/servo/issues/30080.
unminify_js: bool
Unminify Javascript.
local_script_source: Option<String>
Directory path that was created with “unminify-js”
unminify_css: bool
Unminify Css.
print_pwm: bool
Print Progressive Web Metrics to console.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Opts
impl<'de> Deserialize<'de> for Opts
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 Opts
impl RefUnwindSafe for Opts
impl Send for Opts
impl Sync for Opts
impl Unpin for Opts
impl UnwindSafe for Opts
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> 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