pub struct OnMainThread<R> { /* private fields */ }Expand description
The result of a function run on the main thread
(crate::element::run_on_main_thread): await it on the engine thread.
Dropping it does not stop the function.
Trait Implementations§
Source§impl<R> Debug for OnMainThread<R>
impl<R> Debug for OnMainThread<R>
Source§impl<R> Future for OnMainThread<R>
impl<R> Future for OnMainThread<R>
Source§type Output = Result<R, MainThreadError>
type Output = Result<R, MainThreadError>
The type of value produced on completion.
Auto Trait Implementations§
impl<R> Forget for OnMainThread<R>
impl<R> Freeze for OnMainThread<R>
impl<R> Move for OnMainThread<R>
impl<R> RefUnwindSafe for OnMainThread<R>
impl<R> Send for OnMainThread<R>
impl<R> Sync for OnMainThread<R>
impl<R> Unpin for OnMainThread<R>
impl<R> UnsafeUnpin for OnMainThread<R>where
*const ArcInner<Mutex<Shared<R>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Shared<R>>>>: UnsafeUnpin,
impl<R> UnwindSafe for OnMainThread<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