[−][src]Struct browser_window::BrowserThreaded
A thread-safe handle to a browser window. It allows you to dispatch code to the GUI thread.
Implementations
impl BrowserThreaded[src]
pub fn app(&self) -> ApplicationThreaded[src]
The thread-safe application handle associated with this browser window.
pub fn close(self)[src]
Closes the browser.
pub fn delegate<'a, F, R>(&self, func: F) -> BrowserDelegateFuture<'a, R> where
F: FnOnce(Browser) -> R + Send + 'a,
R: Send, [src]
F: FnOnce(Browser) -> R + Send + 'a,
R: Send,
Executes the given closure within the GUI thread, and return the value that the closure returned. Keep in mind that in multi-threaded environments, it is generally a good idea to use a Box return type, or use something else to put the value on the heap when dealing with large types.
pub fn dispatch<'a, F>(&self, func: F) where
F: FnOnce(Browser) + Send + 'a, [src]
F: FnOnce(Browser) + Send + 'a,
Executes the given close on the GUI thread.
pub async fn eval_js<'_, '_>(
&'_ self,
js: &'_ str
) -> Result<String, JsEvaluationError>[src]
&'_ self,
js: &'_ str
) -> Result<String, JsEvaluationError>
Executes the given javascript code, and returns the resulting output as a string when done.
pub async fn navigate<'_, '_>(
&'_ self,
url: &'_ str
) -> Result<(), Box<dyn Error + Send>>[src]
&'_ self,
url: &'_ str
) -> Result<(), Box<dyn Error + Send>>
Causes the browser to navigate to the given url.
Trait Implementations
impl Deref for BrowserThreaded[src]
type Target = BrowserHandle
The resulting type after dereferencing.
fn deref(&self) -> &BrowserHandle[src]
impl Drop for BrowserThreaded[src]
impl Sync for BrowserThreaded[src]
Auto Trait Implementations
impl RefUnwindSafe for BrowserThreaded
impl Send for BrowserThreaded
impl Unpin for BrowserThreaded
impl UnwindSafe for BrowserThreaded
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,