Skip to main content

WebProps

Struct WebProps 

Source
pub struct WebProps {
Show 14 fields pub source: WebSource, pub src: Option<Arc<str>>, pub base_url: Option<Arc<str>>, pub allow_origin: Option<WebOrigin>, pub allow_navigation: Option<WebHosts>, pub injected_js: Option<Arc<str>>, pub injected_js_before: Option<Arc<str>>, pub user_agent: Option<Arc<str>>, pub scrollable: bool, pub javascript_enabled: bool, pub back_forward_gestures: bool, pub incognito: bool, pub zoomable: bool, pub url_schemes: Vec<WebUrlScheme>, /* private fields */
}
Expand description

A web view.

Fields§

§source: WebSource

What it shows.

§src: Option<Arc<str>>

The src prop, which Self::source loads unless html is set.

§base_url: Option<Arc<str>>

The baseUrl prop, which Self::source holds while html is set.

§allow_origin: Option<WebOrigin>

The one origin this web view may show besides webview.hosts (allowOrigin, granted by webview.runtimeOrigin): a web view’s backend checks its navigations with Access::allows_webview_with.

§allow_navigation: Option<WebHosts>

The hosts this web view may show, narrower than the app’s grant (allowNavigation; none: not narrowed). Checked with Access::allows_webview_in.

§injected_js: Option<Arc<str>>

Script run after each page loads.

§injected_js_before: Option<Arc<str>>

Script run before each page’s own scripts.

§user_agent: Option<Arc<str>>

User agent; the platform’s when None.

§scrollable: bool

The page scrolls.

§javascript_enabled: bool

The page may run JavaScript.

§back_forward_gestures: bool

Swipes go back and forward (iOS).

§incognito: bool

Website data (cookies, storage, the cache) lives only as long as the web view, apart from the app’s other web views (Android: no HTTP cache and no saved form data). Read when the platform makes the web view: the core keeps it from changing afterwards.

§zoomable: bool

The person can pinch to zoom the page, past its viewport’s scale limits. Read when the platform makes the web view, as incognito.

§url_schemes: Vec<WebUrlScheme>

The URL schemes the page loads from the app (crate::web_resource). Read when the platform makes the web view, as incognito.

Trait Implementations§

Source§

impl Clone for WebProps

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for WebProps

Source§

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

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

impl Default for WebProps

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for WebProps

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WebProps

Auto Trait Implementations§

§

impl !RefUnwindSafe for WebProps

§

impl !UnwindSafe for WebProps

§

impl Forget for WebProps

§

impl Freeze for WebProps
where *const ArcInner<str> is !null: Freeze, PhantomData<ArcInner<str>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<HostPattern>: Freeze, PhantomData<WebUrlScheme>: Freeze,

§

impl Move for WebProps

§

impl Send for WebProps
where Arc<str>: Send, RawVecInner: Send, Arc<dyn Fn(WebResourceRequest) + Sync + Send>: Send,

§

impl Sync for WebProps
where Arc<str>: Sync, RawVecInner: Sync, Arc<dyn Fn(WebResourceRequest) + Sync + Send>: Sync,

§

impl Unpin for WebProps
where Arc<str>: Unpin, *const u8 is !null: Unpin, Arc<dyn Fn(WebResourceRequest) + Sync + Send>: Unpin,

§

impl UnsafeUnpin for WebProps

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> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.