pub unsafe trait Drain<'d>: App<'d> {
// Required methods
fn begin(
self: Pin<&mut Self>,
turn: Turn<'_, 'd>,
driver: &mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>,
);
fn progress(
self: Pin<&Self>,
region: &Token<Identity<'d>>,
state: Option<&mut Waits<'d>>,
) -> ControlFlow<()>;
fn force(
self: Pin<&mut Self>,
turn: Turn<'_, 'd>,
driver: &mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>,
);
}Expand description
§Safety
Keep admitted owner identities, presence, addresses and routes fixed through finish. Neither method replaces owners or reclaims storage before native shutdown and drain.
Required Methods§
fn begin( self: Pin<&mut Self>, turn: Turn<'_, 'd>, driver: &mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>, )
Sourcefn progress(
self: Pin<&Self>,
region: &Token<Identity<'d>>,
state: Option<&mut Waits<'d>>,
) -> ControlFlow<()>
fn progress( self: Pin<&Self>, region: &Token<Identity<'d>>, state: Option<&mut Waits<'d>>, ) -> ControlFlow<()>
Reports drain work after the application’s pre-park traversal. Completion does not authorize reclaiming retained native owners.
fn force( self: Pin<&mut Self>, turn: Turn<'_, 'd>, driver: &mut Lifecycle<'d, impl Report<Event = <Arena as Drain>::Reported>>, )
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".