pub unsafe trait App<'d>: Sized + Layout<'d> {
const ROUTES: Routes;
const COORDS: usize;
const WAKE_ROUTES: Routes = settings::Routes::EMPTY;
// Required methods
fn select_park() -> Option<Self::ParkPlan>;
unsafe fn park<'app, 'driver, 'turn, 'root>(
app: Pin<&'app mut Self>,
plan: &mut Self::ParkPlan,
park: Park<'driver, 'turn, 'root, 'd>,
)
where 'd: 'driver + 'turn + 'root;
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, 'root>(
_: Pin<&'app mut Self>,
_: Activate<'driver, 'turn, 'root, 'd>,
) -> bool
where 'd: 'driver + 'turn + 'root { ... }
fn dispatch<'app, 'driver, 'turn, 'root>(
call: Dispatch<'app, 'driver, 'turn, 'root, 'd, Self>,
) -> ControlFlow<Event<'d>>
where Self: 'root,
'd: 'root { ... }
fn shutdown<'app, 'turn, 'driver, 'owner>(
shutdown: Shutdown<'app, 'turn, 'driver, 'owner, 'd, Self>,
) -> Shutdown<'app, 'turn, 'driver, 'owner, 'd, Self>
where 'd: 'owner { ... }
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 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() -> Option<Self::ParkPlan>
Sourceunsafe fn park<'app, 'driver, 'turn, 'root>(
app: Pin<&'app mut Self>,
plan: &mut Self::ParkPlan,
park: Park<'driver, 'turn, 'root, 'd>,
)where
'd: 'driver + 'turn + 'root,
unsafe fn park<'app, 'driver, 'turn, 'root>(
app: Pin<&'app mut Self>,
plan: &mut Self::ParkPlan,
park: Park<'driver, 'turn, 'root, 'd>,
)where
'd: 'driver + 'turn + 'root,
§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, 'root>(
_: Pin<&'app mut Self>,
_: Activate<'driver, 'turn, 'root, 'd>,
) -> boolwhere
'd: 'driver + 'turn + 'root,
unsafe fn activate<'app, 'driver, 'turn, 'root>(
_: Pin<&'app mut Self>,
_: Activate<'driver, 'turn, 'root, 'd>,
) -> boolwhere
'd: 'driver + 'turn + 'root,
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<'app, 'driver, 'turn, 'root>(
call: Dispatch<'app, 'driver, 'turn, 'root, 'd, Self>,
) -> ControlFlow<Event<'d>>where
Self: 'root,
'd: 'root,
fn shutdown<'app, 'turn, 'driver, 'owner>(
shutdown: Shutdown<'app, 'turn, 'driver, 'owner, 'd, Self>,
) -> Shutdown<'app, 'turn, 'driver, 'owner, 'd, Self>where
'd: 'owner,
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".