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;
// Provided methods
fn census(_: Pin<&Self>, counts: &mut Census) -> Option<()> { ... }
unsafe fn sweep<'app, 'driver, 'turn>(
app: Pin<&'app mut Self>,
sweep: &mut Sweep<'driver, 'turn, 'd, impl Report>,
)
where 'd: 'driver + 'turn { ... }
unsafe fn park<'app, 'driver, 'turn>(
_: Pin<&'app mut Self>,
_: Turn<'turn, 'd>,
_: &'driver mut Lifecycle<'d, impl Report>,
)
where 'd: 'driver + 'turn { ... }
fn admit(_: Pin<&Self>, needs: &mut Needs) -> Result<(), Claim> { ... }
unsafe fn released(_: Pin<&mut Self>) { ... }
fn install(_: Pin<&mut Self>, _: Install<'_, 'd>) { ... }
unsafe fn activate<'app, 'driver, 'turn>(
_: Pin<&'app mut Self>,
_: Erased<'d, Any>,
_: Turn<'turn, 'd>,
_: &'driver mut Lifecycle<'d, impl Report>,
) -> bool
where 'd: 'driver + 'turn { ... }
fn has_dispatch_owner(_: Pin<&Self>, route: Route) -> bool { ... }
fn dispatch<'event>(
_: Pin<&mut Self>,
event: Dispatch<'event, 'd, Self::Scope>,
_: Turn<'_, 'd>,
_: &mut Lifecycle<'d, impl Report>,
) -> ControlFlow<Dispatch<'event, 'd, Self::Scope>> { ... }
fn progress<const STOP: bool>(
_: Pin<&Self>,
_: Progress<'_, '_, 'd>,
_: Option<&mut Waits<'d>>,
) -> ControlFlow<()> { ... }
fn shutdown(
_: Pin<&mut Self>,
_: Turn<'_, 'd>,
_: &mut Lifecycle<'d, impl Report>,
) { ... }
fn finish(
_: Pin<&mut Self>,
_: Install<'_, 'd>,
_: &mut Finish<'_, 'd, impl Report>,
) { ... }
}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.
A fixed Scope names this owner’s admitted completion route.
ParkPlan = () runs park directly; Flat runs the unchanged census/sweep traversal.
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.
const PARK: bool = false
Provided Methods§
fn census(_: Pin<&Self>, counts: &mut Census) -> Option<()>
Sourceunsafe fn sweep<'app, 'driver, 'turn>(
app: Pin<&'app mut Self>,
sweep: &mut Sweep<'driver, 'turn, 'd, impl Report>,
)where
'd: 'driver + 'turn,
unsafe fn sweep<'app, 'driver, 'turn>(
app: Pin<&'app mut Self>,
sweep: &mut Sweep<'driver, 'turn, 'd, impl Report>,
)where
'd: 'driver + 'turn,
§Safety
Traverse the same admitted pinned owners in their census order.
Sourceunsafe fn park<'app, 'driver, 'turn>(
_: Pin<&'app mut Self>,
_: Turn<'turn, 'd>,
_: &'driver mut Lifecycle<'d, impl Report>,
)where
'd: 'driver + 'turn,
unsafe fn park<'app, 'driver, 'turn>(
_: Pin<&'app mut Self>,
_: Turn<'turn, 'd>,
_: &'driver mut Lifecycle<'d, impl Report>,
)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.
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.
Sourceunsafe fn released(_: Pin<&mut Self>)
unsafe fn released(_: Pin<&mut Self>)
§Safety
All external clients of this exact pinned owner have ended.
fn install(_: Pin<&mut Self>, _: Install<'_, 'd>)
Sourceunsafe fn activate<'app, 'driver, 'turn>(
_: Pin<&'app mut Self>,
_: Erased<'d, Any>,
_: Turn<'turn, 'd>,
_: &'driver mut Lifecycle<'d, impl Report>,
) -> boolwhere
'd: 'driver + 'turn,
unsafe fn activate<'app, 'driver, 'turn>(
_: Pin<&'app mut Self>,
_: Erased<'d, Any>,
_: Turn<'turn, 'd>,
_: &'driver mut Lifecycle<'d, impl Report>,
) -> 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
Use this exact installed pinned root, driver and turn, with a target
belonging to the same driver and declared by WAKE_ROUTES.
Sourcefn has_dispatch_owner(_: Pin<&Self>, route: Route) -> bool
fn has_dispatch_owner(_: Pin<&Self>, route: Route) -> bool
Resolves overlapping candidate routes against the receivers actually installed in this root.
Sourcefn dispatch<'event>(
_: Pin<&mut Self>,
event: Dispatch<'event, 'd, Self::Scope>,
_: Turn<'_, 'd>,
_: &mut Lifecycle<'d, impl Report>,
) -> ControlFlow<Dispatch<'event, 'd, Self::Scope>>
fn dispatch<'event>( _: Pin<&mut Self>, event: Dispatch<'event, 'd, Self::Scope>, _: Turn<'_, 'd>, _: &mut Lifecycle<'d, impl Report>, ) -> ControlFlow<Dispatch<'event, 'd, Self::Scope>>
A selected receiver consumes the completion or returns it to the driver.
Sourcefn progress<const STOP: bool>(
_: Pin<&Self>,
_: Progress<'_, '_, 'd>,
_: Option<&mut Waits<'d>>,
) -> ControlFlow<()>
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.
fn shutdown( _: Pin<&mut Self>, _: Turn<'_, 'd>, _: &mut Lifecycle<'d, impl Report>, )
fn finish( _: Pin<&mut Self>, _: Install<'_, 'd>, _: &mut Finish<'_, 'd, impl Report>, )
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
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.