pub trait WebViewBuilderExtUnix<'a> {
// Required methods
fn build_gtk<W>(self, widget: &'a W) -> Result<WebView>
where W: IsA<Container>;
fn with_extensions_path(self, path: impl Into<PathBuf>) -> Self;
fn with_related_view(self, webview: WebView) -> Self;
}Available on Linux or DragonFly BSD or FreeBSD or NetBSD or OpenBSD only.
Required Methods§
Sourcefn build_gtk<W>(self, widget: &'a W) -> Result<WebView>
fn build_gtk<W>(self, widget: &'a W) -> Result<WebView>
Consume the builder and create the webview inside a GTK container widget, such as GTK window.
- If the container is
gtk::Box, it is added usingBox::pack_start(webview, true, true, 0). - If the container is
gtk::Fixed, its size request will be set using the (width, height) bounds passed in and will be added to the container usingFixed::putusing the (x, y) bounds passed in. - For all other containers, it will be added using
gtk::prelude::ContainerExt::add
§Panics:
- Panics if
gtk::initwas not called in this thread.
Sourcefn with_extensions_path(self, path: impl Into<PathBuf>) -> Self
fn with_extensions_path(self, path: impl Into<PathBuf>) -> Self
Set the path from which to load extensions from.
Creates a new webview sharing the same web process with the provided webview.
Useful if you need to link a webview to another, for instance when using the WebViewBuilder::with_new_window_req_handler.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.