pub struct DelegateFuture<'a, O, H, R>where
R: Send,{ /* private fields */ }
Expand description
This future executes a closure on the GUI thread and returns the result.
Trait Implementations§
Source§impl<'a, O, H, R> Future for DelegateFuture<'a, O, H, R>
impl<'a, O, H, R> Future for DelegateFuture<'a, O, H, R>
impl<'a, O, H, R> Send for DelegateFuture<'a, O, H, R>where
R: Send,
§Safety
DelegateFuture
by itself is not send.
This is because we keep a handle H
, which is not necessarily Send
.
However, because the closure only executes on the GUI thread,
and because the handle is only provided to the closure that will be
executed on the GUI thread, this should be fine.
impl<'a, O, H, R> Unpin for DelegateFuture<'a, O, H, R>where
R: Send,
Auto Trait Implementations§
impl<'a, O, H, R> Freeze for DelegateFuture<'a, O, H, R>
impl<'a, O, H, R> !RefUnwindSafe for DelegateFuture<'a, O, H, R>
impl<'a, O, H, R> !Sync for DelegateFuture<'a, O, H, R>
impl<'a, O, H, R> !UnwindSafe for DelegateFuture<'a, O, H, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more