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§
Provided Associated Constants§
Sourceconst DISPATCH_ROUTES: Routes = Self::ROUTES
const DISPATCH_ROUTES: Routes = Self::ROUTES
Routes on which a nested application may observe a completion.
Sourceconst WAKE_ROUTES: Routes = settings::Routes::EMPTY
const WAKE_ROUTES: Routes = settings::Routes::EMPTY
Routes whose installed owners may receive activation.
Required Methods§
fn select_park() -> Self::ParkPlan
Sourceunsafe fn park<'app, 'driver, 'turn>(
app: Pin<&'app mut Self>,
plan: &mut Self::ParkPlan,
park: Park<'driver, 'turn, 'd>,
)where
'd: 'driver + 'turn,
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.
fn progress(app: Pin<&Self>, view: Progress<'_, '_, 'd>) -> Progress<'d>
fn stopping(app: Pin<&Self>, view: Progress<'_, '_, 'd>) -> Progress<'d>
Provided Methods§
Sourcefn prepare_park(_: Pin<&Self>, _: &mut Self::ParkPlan) -> Option<Count>
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.
Sourcefn admit(_: Pin<&Self>, needs: &mut Needs) -> Result<(), Claim>
fn admit(_: Pin<&Self>, needs: &mut Needs) -> Result<(), Claim>
Accumulates the routes of the owners actually present in this pinned root.
fn released(released: Released<'_, Self>) -> Released<'_, Self>
fn install<'app, 'owner>( install: Install<'app, 'owner, 'd, Self>, ) -> Install<'app, 'owner, 'd, Self>
Sourceunsafe fn activate<'app, 'driver, 'turn>(
_: Pin<&'app mut Self>,
_: Activate<'driver, 'turn, 'd>,
) -> boolwhere
'd: 'driver + 'turn,
unsafe fn activate<'app, 'driver, 'turn>(
_: Pin<&'app mut Self>,
_: Activate<'driver, 'turn, 'd>,
) -> boolwhere
'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.
fn dispatch<'event>( _: Pin<&mut Self>, event: Dispatch<'event, 'd>, _: Turn<'_, 'd>, _: Context<'_, 'd>, ) -> ControlFlow<Dispatch<'event, 'd>>
Sourcefn 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 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.
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>
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>
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.
impl<'app, 'd, H, T> App<'d> for Bound<'app, 'd, H, T>
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>
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.
impl<'d, A, B> App<'d> for Pair<'d, A, B>
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.