Struct web_view::WebView

source ·
pub struct WebView<'a, T: 'a> { /* private fields */ }
Expand description

An owned webview instance.

Construct via a WebViewBuilder.

Implementations

Creates a thread-safe Handle to the WebView, from which closures can be dispatched.

Borrows the user data immutably.

Borrows the user data mutably.

Forces the WebView instance to end, without dropping.

Executes the provided string as JavaScript code within the WebView instance.

Injects the provided string as CSS within the WebView instance.

Sets the color of the title bar.

Examples

Without specifying alpha (defaults to 255):

webview.set_color((123, 321, 213));

Specifying alpha:

webview.set_color((123, 321, 213, 127));

Sets the title displayed at the top of the window.

Errors

If title contain a nul byte, returns Error::NulByte.

Enables or disables fullscreen.

Returns a builder for opening a new dialog window.

Iterates the event loop. Returns None if the view has been closed or terminated.

Runs the event loop to completion and returns the user data.

Consumes the WebView and returns ownership of the user data.

Trait Implementations

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

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.