pub trait Drain {
// Required method
fn drain(&self) -> Result<Checkpoint, WarmSwapError>;
}Expand description
Drains in-flight turns and paused approvals to a committed checkpoint.
Runs while the lease is still held. It waits for the in-flight turn to reach
its turn_complete marker — the commit point every turn is already bracketed
by — and captures the last committed turn plus any paused approvals as a
Checkpoint. It never forces a partial turn to commit: an interrupted turn
is simply excluded, exactly as replay would discard it.
Required Methods§
Sourcefn drain(&self) -> Result<Checkpoint, WarmSwapError>
fn drain(&self) -> Result<Checkpoint, WarmSwapError>
Drain to a committed checkpoint and return it.
§Errors
Returns WarmSwapError::Drain when the conversation cannot reach a
committed checkpoint (for example a journal sync failed).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".