Skip to main content

App

Trait App 

Source
pub unsafe trait App<'d>: Sized + Layout<'d> {
    const ROUTES: Routes;
    const DISPATCH_ROUTES: Routes = Self::ROUTES;
    const WAKE_ROUTES: Routes = settings::Routes::EMPTY;
    const COORDS: usize = 0;
    const PARK: bool = false;
Show 13 methods // Provided methods fn child(_: Pin<&mut Self>) -> Option<Pin<&mut impl App<'d>>> { ... } fn census(_: Pin<&Self>, counts: &mut Census) -> Result<(), Overflow> { ... } unsafe fn sweep<'app, 'driver, 'turn>( app: Pin<&'app mut Self>, sweep: &mut Sweep<'driver, 'turn, 'd, impl Report<Event = <Arena as Drain>::Reported>>, ) where 'd: 'driver + 'turn { ... } unsafe fn park<'app, 'driver, 'turn>( app: Pin<&'app mut Self>, turn: Turn<'turn, 'd>, driver: &'driver mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>, ) where 'd: 'driver + 'turn { ... } fn admit(_: Pin<&Self>, needs: &mut Needs) -> Result<(), Claim> { ... } unsafe fn released(app: Pin<&mut Self>) { ... } fn install(app: Pin<&mut Self>, install: Install<'_, 'd>) { ... } unsafe fn activate<'app, 'driver, 'turn>( _: Pin<&'app mut Self>, _: Erased<'d, Any>, _: Turn<'turn, 'd>, _: &'driver mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>, ) -> ControlFlow<()> where 'd: 'driver + 'turn { ... } fn has_receiver(_: Pin<&Self>, route: Route) -> bool { ... } fn dispatch<'event>( _: Pin<&mut Self>, event: Dispatch<'event, 'd, Self::Scope>, _: Turn<'_, 'd>, _: &mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>, ) -> ControlFlow<Dispatch<'event, 'd, Self::Scope>> { ... } fn progress<const STOP: bool>( _: Pin<&Self>, _: Progress<'_, '_, 'd>, _: Option<&mut Waits<'d>>, ) -> ControlFlow<()> { ... } fn shutdown( app: Pin<&mut Self>, turn: Turn<'_, 'd>, driver: &mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>, ) { ... } fn finish( app: Pin<&mut Self>, install: Install<'_, 'd>, finish: &mut Finish<'_, 'd, impl Report<Event = <Arena as Drain>::Reported>>, ) { ... }
}
Expand description

§Safety

Visit each unchanged pinned owner once, admitting its fixed Scope route and operation authority. Shutdown retains clients; finish destroys dependents first. Unit plans park; Flat preserves census order.

Required Associated Constants§

Provided Associated Constants§

Source

const DISPATCH_ROUTES: Routes = Self::ROUTES

Routes on which a nested application may observe a completion.

Source

const WAKE_ROUTES: Routes = settings::Routes::EMPTY

Routes whose installed owners may receive activation.

Source

const COORDS: usize = 0

Upper bound on idle coordinator probes, including delegated probes.

Source

const PARK: bool = false

Provided Methods§

Source

fn child(_: Pin<&mut Self>) -> Option<Pin<&mut impl App<'d>>>

The unchanged pinned child that receives this owner’s default lifecycle traversal.

Source

fn census(_: Pin<&Self>, counts: &mut Census) -> Result<(), Overflow>

Source

unsafe fn sweep<'app, 'driver, 'turn>( app: Pin<&'app mut Self>, sweep: &mut Sweep<'driver, 'turn, 'd, impl Report<Event = <Arena as Drain>::Reported>>, )
where 'd: 'driver + 'turn,

§Safety

Traverse the same admitted pinned owners in their census order.

Source

unsafe fn park<'app, 'driver, 'turn>( app: Pin<&'app mut Self>, turn: Turn<'turn, 'd>, driver: &'driver mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>, )
where 'd: 'driver + 'turn,

§Safety

The exact pinned root is installed and admitted. Run this leaf’s work or this aggregate’s own coordinator with the same driver and turn.

Source

fn admit(_: Pin<&Self>, needs: &mut Needs) -> Result<(), Claim>

Accumulates the routes of the owners actually present in this pinned root.

Source

unsafe fn released(app: Pin<&mut Self>)

§Safety

All external clients of this exact pinned owner have ended.

Source

fn install(app: Pin<&mut Self>, install: Install<'_, 'd>)

Source

unsafe fn activate<'app, 'driver, 'turn>( _: Pin<&'app mut Self>, _: Erased<'d, Any>, _: Turn<'turn, 'd>, _: &'driver mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>, ) -> ControlFlow<()>
where 'd: 'driver + 'turn,

§Safety

Use this installed root, driver and turn with a target admitted by WAKE_ROUTES. Break only when a present owner consumed this activation.

Source

fn has_receiver(_: Pin<&Self>, route: Route) -> bool

Resolves overlapping candidate routes against the receivers actually installed in this root.

Source

fn dispatch<'event>( _: Pin<&mut Self>, event: Dispatch<'event, 'd, Self::Scope>, _: Turn<'_, 'd>, _: &mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>, ) -> ControlFlow<Dispatch<'event, 'd, Self::Scope>>

A selected receiver consumes the completion or returns it to the driver.

Source

fn progress<const STOP: bool>( _: Pin<&Self>, _: Progress<'_, '_, 'd>, _: Option<&mut Waits<'d>>, ) -> ControlFlow<()>

Reports waits into the same traversal until an owner can run immediately.

Source

fn shutdown( app: Pin<&mut Self>, turn: Turn<'_, 'd>, driver: &mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>, )

Source

fn finish( app: Pin<&mut Self>, install: Install<'_, 'd>, finish: &mut Finish<'_, 'd, impl Report<Event = <Arena as Drain>::Reported>>, )

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'d> App<'d> for ()

Source§

const ROUTES: Routes = settings::Routes::EMPTY

Implementors§

Source§

impl<'app, 'd, H, T> App<'d> for Bound<'app, 'd, H, T>
where H: App<'d>, T: App<'d>,

SAFETY: each lifecycle operation visits all declared owners once, through the same pinned projections and presence in the declared lifecycle order. The root stays pinned through finish and retains each operation’s authority.

Source§

impl<'d, A, B> App<'d> for Pair<'d, A, B>
where A: App<'d> + Root<'d>, B: App<'d> + Root<'d>,

SAFETY: each lifecycle operation visits all declared owners once, through the same pinned projections and presence in the declared lifecycle order. The root stays pinned through finish and retains each operation’s authority.