Skip to main content

WebProps

Struct WebProps 

Source
pub struct WebProps {
    pub renderer: WebRenderer,
    pub profile: WebProfile,
    pub resources: Option<ResourceProvider>,
    pub external_links: bool,
    pub tabs: Option<TabLinkLabels>,
    pub url: String,
    pub session: u64,
    pub inline_root: String,
    pub inline_start: String,
    pub inline_assets: bool,
    pub transparent: bool,
}
Expand description

Full props (realize). The initial url is loaded when the native view is created.

Fields§

§renderer: WebRenderer§profile: WebProfile§resources: Option<ResourceProvider>§external_links: bool

On Apple backends, report user-activated links in ordinary documents as well.

§tabs: Option<TabLinkLabels>§url: String§session: u64

The WebSession this view belongs to, or 0 for none. A non-zero id asks the backend to hand back the session’s existing native view instead of creating one, so the loaded page survives being navigated away from (docs/webview.md).

§inline_root: String

Inline mode (docs/webview.md): the /-relative resource/assets/ path of the bundled site’s root directory, or "" for remote mode. The arm resolves it to its native browsable base, loads <base>/<inline_start>, and cancels+reports navigations that leave the site (Event::Custom with num = the link-report tag).

§inline_start: String

The start page within inline_root ("index.html" unless overridden), which may carry a query or fragment ("player.html?src=hello"). Empty in remote mode.

§inline_assets: bool

Inline mode: the page may read the app’s whole resource/assets/ tree rather than only the site’s own directory (WebView::app_assets). Backends whose browsable base is the asset tree already (Qt’s qrc, Android’s file:///android_asset/, WebView2’s virtual host, the deployed assets/data/ on web-dom) read the same either way; it is WebKit’s file-URL read access and the GTK cache extraction that narrow to the site without it.

§transparent: bool

Draw no background of the view’s own, so a page whose own background is transparent shows the app behind it (WebView::transparent). A view normally paints white under the page.

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§

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> AnyEq for T
where T: Any + PartialEq,

Source§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

Source§

fn as_any(&self) -> &(dyn Any + 'static)

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> ErasedDestructor for T
where T: 'static,

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

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> IntoReactive<T, StaticMark> for T
where T: Clone + 'static,

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.