Enum webview2_sys::HostResourceAccessKind[][src]

#[repr(u32)]
pub enum HostResourceAccessKind {
    Deny,
    Allow,
    DenyCors,
}

Kind of cross origin resource access allowed for host resources during download. Note that other normal access checks like same origin DOM access check and Content Security Policy still apply. The following table illustrates the host resource cross origin access according to access context and COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND. Cross Origin Access Context | DENY | ALLOW | DENY_CORS — | — | — | — From DOM like src of img, script or iframe element| Deny | Allow | Allow From Script like Fetch or XMLHttpRequest| Deny | Allow | Deny

Variants

Deny

All cross origin resource access is denied, including normal sub resource access as src of a script or image element.

Allow

All cross origin resource access is allowed, including accesses that are subject to Cross-Origin Resource Sharing(CORS) check. The behavior is similar to a web site sends back http header Access-Control-Allow-Origin: *.

DenyCors

Cross origin resource access is allowed for normal sub resource access like as src of a script or image element, while any access that subjects to CORS check will be denied. See Cross-Origin Resource Sharing for more information.

Trait Implementations

impl Clone for HostResourceAccessKind[src]

impl Copy for HostResourceAccessKind[src]

impl Debug for HostResourceAccessKind[src]

impl Eq for HostResourceAccessKind[src]

impl PartialEq<HostResourceAccessKind> for HostResourceAccessKind[src]

impl StructuralEq for HostResourceAccessKind[src]

impl StructuralPartialEq for HostResourceAccessKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.