pub struct PendingWindow<T: UserEvent, R: Runtime<T>> {
    pub label: String,
    pub window_builder: <R::Dispatcher as Dispatch<T>>::WindowBuilder,
    pub webview_attributes: WebviewAttributes,
    pub uri_scheme_protocols: HashMap<String, Box<dyn Fn(&HttpRequest) -> Result<HttpResponse, Box<dyn Error>> + Send + Sync + 'static>>,
    pub ipc_handler: Option<WebviewIpcHandler<T, R>>,
    pub url: String,
    pub menu_ids: Arc<Mutex<HashMap<MenuHash, MenuId>>>,
    pub js_event_listeners: Arc<Mutex<HashMap<JsEventListenerKey, HashSet<u64>>>>,
}
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<T>>::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>>§ipc_handler: Option<WebviewIpcHandler<T, R>>

How to handle IPC calls on the webview window.

§url: String

The resolved URL to load on the webview.

§menu_ids: Arc<Mutex<HashMap<MenuHash, MenuId>>>

Maps runtime id to a string menu id.

§js_event_listeners: Arc<Mutex<HashMap<JsEventListenerKey, HashSet<u64>>>>

A HashMap mapping JS event names with associated listener ids.

Implementations§

Create a new PendingWindow with a label and starting url.

Create a new PendingWindow from a WindowConfig with a label and starting url.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.