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: boolOn Apple backends, report user-activated links in ordinary documents as well.
tabs: Option<TabLinkLabels>§url: String§session: u64The 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: StringInline 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: StringThe 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: boolInline 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: boolDraw 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§
impl StructuralPartialEq for WebProps
Auto Trait Implementations§
impl !RefUnwindSafe for WebProps
impl !UnwindSafe for WebProps
impl Freeze for WebProps
impl Send for WebProps
impl Sync for WebProps
impl Unpin for WebProps
impl UnsafeUnpin for WebProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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