Struct servo_config::opts::Opts

source ·
pub struct Opts {
Show 31 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 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 print_pwm: bool, pub minibrowser: 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.

§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”

§print_pwm: bool

Print Progressive Web Metrics to console.

§minibrowser: bool

True to enable minibrowser

Trait Implementations§

source§

impl Clone for Opts

source§

fn clone(&self) -> Opts

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Opts

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Opts

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Opts

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,