pub struct App<'app, 'life: 'app, 'd: 'life, D: Layout<'d>, Q = ()> { /* private fields */ }Expand description
Live application view scoped to one installed session.
Implementations§
Source§impl<'app, 'life: 'app, 'd: 'life, D, Q> App<'app, 'life, 'd, D, Q>where
D: App<'d>,
impl<'app, 'life: 'app, 'd: 'life, D, Q> App<'app, 'life, 'd, D, Q>where
D: App<'d>,
pub fn drive<R>(&mut self, root: R) -> Result<R::Output, Error>where
R: Root<'d>,
pub fn run(self) -> Result<Requested<Q>, Error>
Sourcepub fn drive_until<R>(
self,
root: R,
) -> Result<ControlFlow<R::Output, Requested<Q>>, Error>where
R: Root<'d>,
pub fn drive_until<R>(
self,
root: R,
) -> Result<ControlFlow<R::Output, Requested<Q>>, Error>where
R: Root<'d>,
Returns a completed root or the shutdown request after dropping the pending root. A root completed in the shutdown turn keeps its output.
Sourcepub fn drive_for<R>(
&mut self,
timeout: Duration,
root: R,
) -> Result<R::Output, Error>where
R: Root<'d>,
pub fn drive_for<R>(
&mut self,
timeout: Duration,
root: R,
) -> Result<R::Output, Error>where
R: Root<'d>,
Drives one root with a wall-clock deadline, checked between executor turns. Each root poll must return to the executor for the deadline to be observed.
Sourcepub fn run_for(self, timeout: Duration) -> Result<Requested<Q>, Error>
pub fn run_for(self, timeout: Duration) -> Result<Requested<Q>, Error>
Serves until shutdown or the wall-clock deadline, checked between turns. Each application transition must return to the executor.
pub fn run_drain(self, timeout: Positive) -> Result<Report<Q>, Error>where
D: Drain<'d>,
Sourcepub fn drive_drain<R>(
self,
timeout: Positive,
root: R,
) -> Result<ControlFlow<R::Output, Report<Q>>, Error>
pub fn drive_drain<R>( self, timeout: Positive, root: R, ) -> Result<ControlFlow<R::Output, Report<Q>>, Error>
Returns a completed root, or drains after shutdown once the pending root is dropped. A root completed in the shutdown turn keeps its output; the drain timeout starts at shutdown.
Methods from Deref<Target = Access<'app, 'life, 'd, D, Q>>§
pub fn state_token(&mut self) -> &mut Token<Identity<'d, 1>>
Sourcepub fn root_client(&mut self) -> <D::Provider as Provider<'d>>::Client<'app>
pub fn root_client(&mut self) -> <D::Provider as Provider<'d>>::Client<'app>
Issues the client of the complete installed root.
pub fn client<P>( &mut self, select: impl for<'borrow> FnOnce(Pin<&'borrow D>) -> Pin<&'borrow P>, ) -> <P::Provider as Provider<'d>>::Client<'app>
pub fn client_with<P, C>( &mut self, select: impl for<'borrow> FnOnce(Pin<&'borrow D>) -> Pin<&'borrow P>, issue: impl for<'borrow> FnOnce(Context<'borrow, 'app, 'd, P>) -> C, ) -> C
pub fn inspect<P, C>( &mut self, select: impl for<'borrow> FnOnce(Pin<&'borrow D>) -> Pin<&'borrow P>, inspect: impl for<'borrow> FnOnce(Pin<&'borrow P>) -> C, ) -> C
Trait Implementations§
Auto Trait Implementations§
impl<'app, 'life, 'd, D, Q = ()> !RefUnwindSafe for App<'app, 'life, 'd, D, Q>
impl<'app, 'life, 'd, D, Q = ()> !Send for App<'app, 'life, 'd, D, Q>
impl<'app, 'life, 'd, D, Q = ()> !Sync for App<'app, 'life, 'd, D, Q>
impl<'app, 'life, 'd, D, Q = ()> !UnwindSafe for App<'app, 'life, 'd, D, Q>
impl<'app, 'life, 'd, D, Q> Freeze for App<'app, 'life, 'd, D, Q>
impl<'app, 'life, 'd, D, Q> Unpin for App<'app, 'life, 'd, D, Q>
impl<'app, 'life, 'd, D, Q> UnsafeUnpin for App<'app, 'life, 'd, D, Q>where
Access<'app, 'life, 'd, D, Q>: UnsafeUnpin,
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