pub struct BrowserWebViewBuilder { /* private fields */ }Implementations§
Source§impl BrowserWebViewBuilder
impl BrowserWebViewBuilder
Sourcepub fn delegate(self, delegate: Arc<dyn WebViewDelegate>) -> Self
pub fn delegate(self, delegate: Arc<dyn WebViewDelegate>) -> Self
Bind a WebViewDelegate during creation.
This is the only supported way to configure delegate callbacks.
pub fn on_scheme<F, Fut>(self, scheme: &str, handler: F) -> Self
pub fn on_new_window<F>(self, handler: F) -> Self
Sourcepub fn on_download<F>(self, handler: F) -> Self
pub fn on_download<F>(self, handler: F) -> Self
Register a download callback (browser profile only).
The callback runs on the platform callback thread; keep it fast and offload expensive work to your app runtime.
pub fn on_file_chooser<F, Fut>(self, handler: F) -> Selfwhere
F: Fn(FileChooserRequest) -> Fut + Send + Sync + 'static,
Fut: Future<Output = FileChooserResponse> + Send + 'static,
Sourcepub fn create(self) -> WebViewSession
pub fn create(self) -> WebViewSession
Create a browser-profile WebView session.
Re-creating with the same webtag follows strict rules:
- Different options => creation fails.
- Same options but new callback registrations => creation fails.
- Same options and no callbacks => existing instance is reused.
Auto Trait Implementations§
impl !RefUnwindSafe for BrowserWebViewBuilder
impl !UnwindSafe for BrowserWebViewBuilder
impl Freeze for BrowserWebViewBuilder
impl Send for BrowserWebViewBuilder
impl Sync for BrowserWebViewBuilder
impl Unpin for BrowserWebViewBuilder
impl UnsafeUnpin for BrowserWebViewBuilder
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
Mutably borrows from an owned value. Read more