pub(crate) struct ServoShellPreferences {Show 13 fields
pub url: Option<String>,
pub device_pixel_ratio_override: Option<f32>,
pub clean_shutdown: bool,
pub no_native_titlebar: bool,
pub homepage: String,
pub searchpage: String,
pub headless: bool,
pub tracing_filter: Option<String>,
pub initial_window_size: Size2D<u32, DeviceIndependentPixel>,
pub screen_size_override: Option<Size2D<u32, DeviceIndependentPixel>>,
pub output_image_path: Option<String>,
pub exit_after_stable_image: bool,
pub userscripts_directory: Option<PathBuf>,
}
Fields§
§url: Option<String>
A URL to load when starting servoshell.
device_pixel_ratio_override: Option<f32>
An override value for the device pixel ratio.
clean_shutdown: bool
Whether or not to attempt clean shutdown.
no_native_titlebar: bool
Enable native window’s titlebar and decorations.
homepage: String
URL string of the homepage.
searchpage: String
URL string of the search engine page with ‘%s’ standing in for the search term. For example https://duckduckgo.com/html/?q=%s.
headless: bool
Whether or not to run servoshell in headless mode. While running in headless mode, image output is supported.
tracing_filter: Option<String>
Filter directives for our tracing implementation.
Overrides directives specified via SERVO_TRACING
if set.
See: https://docs.rs/tracing-subscriber/0.3.19/tracing_subscriber/filter/struct.EnvFilter.html#directives
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.
output_image_path: Option<String>
If not-None, the path to a file to output the default WebView’s rendered output
after waiting for a stable image, this implies Self::exit_after_load
.
exit_after_stable_image: bool
Whether or not to exit after Servo detects a stable output image in all WebViews.
userscripts_directory: Option<PathBuf>
Where to load userscripts from, if any. and if the option isn’t passed userscripts won’t be loaded.
Trait Implementations§
Source§impl Clone for ServoShellPreferences
impl Clone for ServoShellPreferences
Source§fn clone(&self) -> ServoShellPreferences
fn clone(&self) -> ServoShellPreferences
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for ServoShellPreferences
impl RefUnwindSafe for ServoShellPreferences
impl Send for ServoShellPreferences
impl Sync for ServoShellPreferences
impl Unpin for ServoShellPreferences
impl UnwindSafe for ServoShellPreferences
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for 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 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>
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.