Skip to main content

Drain

Trait Drain 

Source
pub unsafe trait Drain<'d>: App<'d> {
    // Required methods
    fn begin(
        self: Pin<&mut Self>,
        turn: Turn<'_, 'd>,
        driver: &mut Context<'_, '_, 'd>,
    );
    fn progress(self: Pin<&Self>, region: &Token<Identity<'d>>) -> Progress<'d>;
    fn force(
        self: Pin<&mut Self>,
        turn: Turn<'_, 'd>,
        driver: &mut Context<'_, '_, 'd>,
    );
}
Expand description

Cooperative drain while the complete application remains installed.

§Safety

Preserve every admitted owner’s identity, presence, address, and routes through finish. begin and force must not replace owners or reclaim retained storage. Cooperative quiescence does not authorize reclamation: the runtime still shuts down every admitted owner and drains native operations before finish.

Required Methods§

Source

fn begin( self: Pin<&mut Self>, turn: Turn<'_, 'd>, driver: &mut Context<'_, '_, 'd>, )

Source

fn progress(self: Pin<&Self>, region: &Token<Identity<'d>>) -> Progress<'d>

Source

fn force( self: Pin<&mut Self>, turn: Turn<'_, 'd>, driver: &mut Context<'_, '_, 'd>, )

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> Drain<'d> for Pair<'app, 'd, H, T>
where Pair<'app, 'd, H, T>: App<'d>, Owner<ManuallyDrop<T>, T>: Drain<'d>,

SAFETY: the parser admits one required drain owner. Both mutations forward its pinned projection; all other owners remain installed.

Source§

impl<'d, H, T> Drain<'d> for Bound<'_, 'd, H, T>
where H: App<'d>, T: Drain<'d>,

Source§

impl<'d, S, T> Drain<'d> for Owner<S, T>
where S: Project<App = T>, T: Drain<'d>, Self: Finishes<'d, Self>,