[−][src]Struct browser_window::BrowserWindowAsync
A thread-safe handle to a browser window. It allows you to dispatch code to the GUI thread.
Implementations
impl BrowserWindowAsync
[src]
pub async fn close(self)
[src]
Closes the browser.
pub fn dispatch<'a, F, R>(&self, func: F) -> BrowserWindowDispatchFuture<'a, R> where
F: FnOnce(BrowserWindowHandle) -> R + Send + 'a,
R: Send,
[src]
F: FnOnce(BrowserWindowHandle) -> R + Send + 'a,
R: Send,
Executes the given closure within the GUI thread
Arguments
func
- The closure to run on the GUI thread
pub async fn eval_js<'_, '_>(
&'_ self,
js: &'_ str
) -> Result<String, Box<dyn Error + Send>>
[src]
&'_ self,
js: &'_ str
) -> Result<String, Box<dyn Error + Send>>
Executes the given javascript code, and returns the resulting output as a string when done.
Arguments:
js
- Javascript code
pub async fn navigate<'_, '_>(
&'_ self,
url: &'_ str
) -> Result<(), Box<dyn Error + Send>>
[src]
&'_ self,
url: &'_ str
) -> Result<(), Box<dyn Error + Send>>
Trait Implementations
impl Clone for BrowserWindowAsync
[src]
fn clone(&self) -> BrowserWindowAsync
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for BrowserWindowAsync
impl Send for BrowserWindowAsync
impl Sync for BrowserWindowAsync
impl Unpin for BrowserWindowAsync
impl UnwindSafe for BrowserWindowAsync
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,