Skip to main content

App

Trait App 

Source
pub unsafe trait App<'d>: Sized + Layout<'d> {
    const ROUTES: Routes;
    const COORDS: usize;
    const PARK: bool;
    const DISPATCH_ROUTES: Routes = Self::ROUTES;
    const WAKE_ROUTES: Routes = settings::Routes::EMPTY;
Show 13 methods // Required methods fn select_park() -> Self::ParkPlan; unsafe fn park<'app, 'driver, 'turn>( app: Pin<&'app mut Self>, plan: &mut Self::ParkPlan, park: Park<'driver, 'turn, 'd>, ) where 'd: 'driver + 'turn; fn progress(app: Pin<&Self>, view: Progress<'_, '_, 'd>) -> Progress<'d>; fn stopping(app: Pin<&Self>, view: Progress<'_, '_, 'd>) -> Progress<'d>; // Provided methods fn prepare_park(_: Pin<&Self>, _: &mut Self::ParkPlan) -> Option<Count> { ... } fn admit(_: Pin<&Self>, needs: &mut Needs) -> Result<(), Claim> { ... } fn released(released: Released<'_, Self>) -> Released<'_, Self> { ... } fn install<'app, 'owner>( install: Install<'app, 'owner, 'd, Self>, ) -> Install<'app, 'owner, 'd, Self> { ... } unsafe fn activate<'app, 'driver, 'turn>( _: Pin<&'app mut Self>, _: Activate<'driver, 'turn, 'd>, ) -> bool where 'd: 'driver + 'turn { ... } fn dispatch<'event>( _: Pin<&mut Self>, event: Dispatch<'event, 'd>, _: Turn<'_, 'd>, _: Context<'_, 'd>, ) -> ControlFlow<Dispatch<'event, 'd>> { ... } fn dispatch_from<'app, 'event, const NESTED: bool>( project: impl FnOnce() -> Pin<&'app mut Self>, event: Dispatch<'event, 'd>, turn: Turn<'_, 'd>, driver: Context<'_, 'd>, ) -> ControlFlow<Dispatch<'event, 'd>> where Self: 'app { ... } fn shutdown<'app, 'turn, 'driver>( shutdown: Shutdown<'app, 'turn, 'driver, 'd, Self>, ) -> Shutdown<'app, 'turn, 'driver, 'd, Self> { ... } fn finish<'app, 'finish, 'owner, 'epoch>( finish: Finish<'app, 'finish, 'owner, 'epoch, 'd, Self>, ) -> Finish<'app, 'finish, 'owner, 'epoch, 'd, Self> { ... }
}
Expand description

§Safety

Visit each owner once through unchanged pinned projections, presence, and operation authority. Admission includes every present owner’s route, without merging duplicate owners. Keep the root pinned; shutdown preserves client storage and finish destroys dependents before providers.

Required Associated Constants§

Source

const ROUTES: Routes

Source

const COORDS: usize

Upper bound on idle coordinator probes, including delegated probes.

Source

const PARK: bool

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.

Required Methods§

Source

fn select_park() -> Self::ParkPlan

Source

unsafe fn park<'app, 'driver, 'turn>( app: Pin<&'app mut Self>, plan: &mut Self::ParkPlan, park: Park<'driver, 'turn, 'd>, )
where 'd: 'driver + 'turn,

§Safety

The exact pinned root is installed and this plan completed preparation and admission for that root. The park authority belongs to the same root.

Source

fn progress(app: Pin<&Self>, view: Progress<'_, '_, 'd>) -> Progress<'d>

Source

fn stopping(app: Pin<&Self>, view: Progress<'_, '_, 'd>) -> Progress<'d>

Provided Methods§

Source

fn prepare_park(_: Pin<&Self>, _: &mut Self::ParkPlan) -> Option<Count>

Prepares the selected coordinator shares once after installation. The count does not exceed COORDS; field presence and shares remain stable through finish. None reports count overflow.

Source

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

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

Source

fn released(released: Released<'_, Self>) -> Released<'_, Self>

Source

fn install<'app, 'owner>( install: Install<'app, 'owner, 'd, Self>, ) -> Install<'app, 'owner, 'd, Self>

Source

unsafe fn activate<'app, 'driver, 'turn>( _: Pin<&'app mut Self>, _: Activate<'driver, 'turn, 'd>, ) -> bool
where 'd: 'driver + 'turn,

Returns whether a present owner handled this activation. On false, the caller may continue through the remaining owners of the same root.

§Safety

The activation retains this exact installed pinned root and a target declared by WAKE_ROUTES.

Source

fn dispatch<'event>( _: Pin<&mut Self>, event: Dispatch<'event, 'd>, _: Turn<'_, 'd>, _: Context<'_, 'd>, ) -> ControlFlow<Dispatch<'event, 'd>>

Source

fn dispatch_from<'app, 'event, const NESTED: bool>( project: impl FnOnce() -> Pin<&'app mut Self>, event: Dispatch<'event, 'd>, turn: Turn<'_, 'd>, driver: Context<'_, 'd>, ) -> ControlFlow<Dispatch<'event, 'd>>
where Self: 'app,

A nested miss preserves the event without borrowing its owner.

Source

fn shutdown<'app, 'turn, 'driver>( shutdown: Shutdown<'app, 'turn, 'driver, 'd, Self>, ) -> Shutdown<'app, 'turn, 'driver, 'd, Self>

Source

fn finish<'app, 'finish, 'owner, 'epoch>( finish: Finish<'app, 'finish, 'owner, 'epoch, 'd, Self>, ) -> Finish<'app, 'finish, 'owner, 'epoch, 'd, Self>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<'app, 'd, H, T> App<'d> for Bound<'app, 'd, H, T>
where Owner<Pin<&'app mut H>, H>: App<'d>, Owner<ManuallyDrop<T>, 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.

Source§

impl<'d, S, T> App<'d> for Owner<S, T>
where S: Project<App = T>, T: App<'d>, Self: Finishes<'d, Self>,

Source§

const ROUTES: Routes = T::ROUTES

Source§

const DISPATCH_ROUTES: Routes = T::DISPATCH_ROUTES

Source§

const WAKE_ROUTES: Routes = T::WAKE_ROUTES

Source§

const COORDS: usize

Source§

const PARK: bool = T::PARK