Enum embedder_traits::resources::Resource

source ·
pub enum Resource {
Show 15 variants Preferences, BluetoothBlocklist, DomainList, HstsPreloadList, BadCertHTML, NetErrorHTML, UserAgentCSS, ServoCSS, PresentationalHintsCSS, QuirksModeCSS, RippyPNG, MediaControlsCSS, MediaControlsJS, CrashHTML, DirectoryListingHTML,
}

Variants§

§

Preferences

A json file of Preferences configuration. It can be empty but lots of features will be disabled.

§

BluetoothBlocklist

A list of GATT services that are blocked from being used by web bluetooth. The format of the file is a list of UUIDs, one per line, with an optional second word to specify the type of blocklist. It can be empty but then all GATT services will be allowed.

§

DomainList

A list of domain names that are considered public suffixes, typically obtained from https://publicsuffix.org/list/. The Public Suffix List is a cross-vendor initiative to provide an accurate list of domain name suffixes that are under the control of a registry. This is used to prevent cookies from being set for top-level domains that are not controlled by the same entity as the website. It can be empty but all domain names will be considered not public suffixes.

§

HstsPreloadList

A preloaded list of HTTP Strict Transport Security. It can be an empty list and HstsList::default() will be called.

§

BadCertHTML

A HTML page to display when SslValidation network error is reported. The page contains placeholder ${reason} for the error code and ${bytes} for the certificate bytes, and also ${secret} for the privileged secret. It can be empty but then nothing will be displayed when a certificate error occurs.

§

NetErrorHTML

A HTML page to display when any network error occurs that is not related to SSL validation. The message can contain a placeholder ${reason} for the error code. It can be empty but then nothing will be displayed when an internal error occurs.

§

UserAgentCSS

A CSS file to style the user agent stylesheet. It can be empty but then there’s simply no user agent stylesheet.

§

ServoCSS

A CSS file to style the Servo browser. It can be empty but several features might not work as expected.

§

PresentationalHintsCSS

A CSS file to style the presentational hints. It can be empty but then presentational hints will not be styled.

§

QuirksModeCSS

A CSS file to style the quirks mode. It can be empty but then quirks mode will not be styled.

§

RippyPNG

A placeholder image to display if we couldn’t get the requested image.

§Safety

Servo will crash if this is an invalid image. Check resources/rippy.png in Servo codebase to see what a default rippy png should look like.

§

MediaControlsCSS

A CSS file to style the media controls. It can be empty but then media controls will not be styled.

§

MediaControlsJS

A JS file to control the media controls. It can be empty but then media controls will not work.

§

CrashHTML

A placeholder HTML page to display when the code responsible for rendering a page panics and the original page can no longer be displayed. The message can contain a placeholder ${details} for the error details. It can be empty but then nothing will be displayed when a crash occurs.

§

DirectoryListingHTML

A HTML page to display when a directory listing is requested. The page contains a js function setData that will then be used to build the list of directory. It can be empty but then nothing will be displayed when a directory listing is requested.

Implementations§

source§

impl Resource

source

pub fn filename(&self) -> &'static str

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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 T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T