[−][src]Struct browser_window::browser::BrowserWindowThreaded
A thread-safe handle to a browser window. It allows you to dispatch code to the GUI thread.
Implementations
impl BrowserWindowThreaded[src]
pub fn app(&self) -> ApplicationHandleThreaded[src]
The thread-safe application handle associated with this browser window.
pub fn close(self) -> bool[src]
Closes the browser.
pub fn delegate<'a, F, R>(&self, func: F) -> BrowserDelegateFuture<'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, and return the value that the closure returned.
Also see ApplicationThreaded::delegate.
The function signature is practically the same as:
pub async fn delegate<'a,F,R>( &self, func: F ) -> Result<R, DelegateError> where F: FnOnce( BrowserWindowHandle ) -> R + Send + 'a, R: Send { //...
pub fn delegate_async<'a, C, F, R>(
&self,
func: C
) -> DelegateFutureFuture<'a, R>ⓘNotable traits for DelegateFutureFuture<'a, R>
impl<'a, R> Future for DelegateFutureFuture<'a, R> where
R: Send, type Output = Result<R, DelegateError>; where
C: FnOnce(BrowserWindowHandle) -> F + Send + 'a,
F: Future<Output = R>,
R: Send + 'static, [src]
&self,
func: C
) -> DelegateFutureFuture<'a, R>ⓘ
Notable traits for DelegateFutureFuture<'a, R>
impl<'a, R> Future for DelegateFutureFuture<'a, R> where
R: Send, type Output = Result<R, DelegateError>;C: FnOnce(BrowserWindowHandle) -> F + Send + 'a,
F: Future<Output = R>,
R: Send + 'static,
Executes the given async closure func on the GUI thread, and gives back the result when done.
Also see ApplicationThreaded::delegate_async.
pub fn dispatch<'a, F>(&self, func: F) -> bool where
F: FnOnce(BrowserWindowHandle) + Send + 'a, [src]
F: FnOnce(BrowserWindowHandle) + Send + 'a,
Executes the given close on the GUI thread.
See also Application::dispatch.
Trait Implementations
impl Drop for BrowserWindowThreaded[src]
impl OwnedBrowserWindow for BrowserWindowThreaded[src]
fn handle(&self) -> BrowserWindowHandle[src]
impl Sync for BrowserWindowThreaded[src]
Auto Trait Implementations
impl RefUnwindSafe for BrowserWindowThreaded
impl Send for BrowserWindowThreaded
impl Unpin for BrowserWindowThreaded
impl UnwindSafe for BrowserWindowThreaded
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>,