cef_scheme_options_t

Enum cef_scheme_options_t 

Source
#[non_exhaustive]
#[repr(u32)]
pub enum cef_scheme_options_t { CEF_SCHEME_OPTION_NONE = 0, CEF_SCHEME_OPTION_STANDARD = 1, CEF_SCHEME_OPTION_LOCAL = 2, CEF_SCHEME_OPTION_DISPLAY_ISOLATED = 4, CEF_SCHEME_OPTION_SECURE = 8, CEF_SCHEME_OPTION_CORS_ENABLED = 16, CEF_SCHEME_OPTION_CSP_BYPASSING = 32, CEF_SCHEME_OPTION_FETCH_ENABLED = 64, }
Expand description

Configuration options for registering a custom scheme. These values are used when calling AddCustomScheme.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

CEF_SCHEME_OPTION_NONE = 0

§

CEF_SCHEME_OPTION_STANDARD = 1

For non-standard scheme URLs only the “scheme:” component is parsed and canonicalized. The remainder of the URL will be passed to the handler as- is. For example, “scheme:///some%20text” will remain the same. Non-standard scheme URLs cannot be used as a target for form submission.

§

CEF_SCHEME_OPTION_LOCAL = 2

If CEF_SCHEME_OPTION_LOCAL is set the scheme will be treated with the same security rules as those applied to “file” URLs. Normal pages cannot link to or access local URLs. Also, by default, local URLs can only perform XMLHttpRequest calls to the same URL (origin + path) that originated the request. To allow XMLHttpRequest calls from a local URL to other URLs with the same origin set the CefSettings.file_access_from_file_urls_allowed value to true (1). To allow XMLHttpRequest calls from a local URL to all origins set the CefSettings.universal_access_from_file_urls_allowed value to true (1).

§

CEF_SCHEME_OPTION_DISPLAY_ISOLATED = 4

If CEF_SCHEME_OPTION_DISPLAY_ISOLATED is set the scheme can only be displayed from other content hosted with the same scheme. For example, pages in other origins cannot create iframes or hyperlinks to URLs with the scheme. For schemes that must be accessible from other schemes don’t set this, set CEF_SCHEME_OPTION_CORS_ENABLED, and use CORS “Access-Control-Allow-Origin” headers to further restrict access.

§

CEF_SCHEME_OPTION_SECURE = 8

If CEF_SCHEME_OPTION_SECURE is set the scheme will be treated with the same security rules as those applied to “https” URLs. For example, loading this scheme from other secure schemes will not trigger mixed content warnings.

§

CEF_SCHEME_OPTION_CORS_ENABLED = 16

If CEF_SCHEME_OPTION_CORS_ENABLED is set the scheme can be sent CORS requests. This value should be set in most cases where CEF_SCHEME_OPTION_STANDARD is set.

§

CEF_SCHEME_OPTION_CSP_BYPASSING = 32

If CEF_SCHEME_OPTION_CSP_BYPASSING is set the scheme can bypass Content- Security-Policy (CSP) checks. This value should not be set in most cases where CEF_SCHEME_OPTION_STANDARD is set.

§

CEF_SCHEME_OPTION_FETCH_ENABLED = 64

If CEF_SCHEME_OPTION_FETCH_ENABLED is set the scheme can perform Fetch API requests.

Trait Implementations§

Source§

impl Clone for cef_scheme_options_t

Source§

fn clone(&self) -> cef_scheme_options_t

Returns a duplicate 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 cef_scheme_options_t

Source§

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

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

impl Hash for cef_scheme_options_t

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for cef_scheme_options_t

Source§

fn eq(&self, other: &cef_scheme_options_t) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for cef_scheme_options_t

Source§

impl Eq for cef_scheme_options_t

Source§

impl StructuralPartialEq for cef_scheme_options_t

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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>,

Source§

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.