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>(
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<'app, 'driver, 'turn>(
call: Dispatch<'app, 'driver, 'turn, 'd, Self>,
) -> ControlFlow<Event<'d>> { ... }
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 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>(
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<'app, 'driver, 'turn>( call: Dispatch<'app, 'driver, 'turn, 'd, Self>, ) -> ControlFlow<Event<'d>>
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 dope_runtime::topology::lending::raw::Pair<'app, 'd, H, T>
SAFETY: each lifecycle operation visits all declared owners once,
in declaration order, through the same pinned projections and presence.
The root stays pinned through finish and retains each operation’s authority.
impl<'app, 'd, H, T> App<'d> for dope_runtime::topology::lending::raw::Pair<'app, 'd, H, T>
SAFETY: each lifecycle operation visits all declared owners once, in declaration order, through the same pinned projections and presence. The root stays pinned through finish and retains each operation’s authority.