Struct tauri_runtime::window::PendingWindow [−][src]
pub struct PendingWindow<R: Runtime> {
pub label: String,
pub window_builder: <R::Dispatcher as Dispatch>::WindowBuilder,
pub webview_attributes: WebviewAttributes,
pub uri_scheme_protocols: HashMap<String, Box<dyn Fn(&HttpRequest) -> Result<HttpResponse, Box<dyn Error>> + Send + Sync + 'static>>,
pub rpc_handler: Option<WebviewRpcHandler<R>>,
pub file_drop_handler: Option<FileDropHandler<R>>,
pub url: String,
}
Expand description
A webview window that has yet to be built.
Fields
label: String
The label that the window will be named.
window_builder: <R::Dispatcher as Dispatch>::WindowBuilder
The WindowBuilder
that the window will be created with.
webview_attributes: WebviewAttributes
The WebviewAttributes
that the webview will be created with.
uri_scheme_protocols: HashMap<String, Box<dyn Fn(&HttpRequest) -> Result<HttpResponse, Box<dyn Error>> + Send + Sync + 'static>>
rpc_handler: Option<WebviewRpcHandler<R>>
How to handle RPC calls on the webview window.
file_drop_handler: Option<FileDropHandler<R>>
How to handle a file dropping onto the webview window.
url: String
The resolved URL to load on the webview.
Implementations
pub fn new(
window_builder: <R::Dispatcher as Dispatch>::WindowBuilder,
webview_attributes: WebviewAttributes,
label: impl Into<String>
) -> Self
pub fn new(
window_builder: <R::Dispatcher as Dispatch>::WindowBuilder,
webview_attributes: WebviewAttributes,
label: impl Into<String>
) -> Self
Create a new PendingWindow
with a label and starting url.
pub fn with_config(
window_config: WindowConfig,
webview_attributes: WebviewAttributes,
label: impl Into<String>
) -> Self
pub fn with_config(
window_config: WindowConfig,
webview_attributes: WebviewAttributes,
label: impl Into<String>
) -> Self
Create a new PendingWindow
from a WindowConfig
with a label and starting url.