pub struct RejectedWriter { /* private fields */ }Expand description
Isolated cleanup ownership after a provider returned an invalid identity.
This handle cannot write or publish. Cleanup acts only on resources owned by its session, never on a diagnostic path. Drop performs no explicit cleanup or cancellation hook; retain this handle until cleanup is confirmed.
use qubit_fs::write::RejectedWriter;
fn cannot_publish(mut recovery: RejectedWriter) {
recovery.commit();
}§Examples
use qubit_fs::error::FsResult;
use qubit_fs::write::RejectedWriter;
use qubit_fs::write::WriteAbortOutcome;
fn clean_up(recovery: &mut RejectedWriter) -> FsResult<WriteAbortOutcome> {
// Keep the handle available if cleanup returns an error.
recovery.abort()
}Implementations§
Source§impl RejectedWriter
impl RejectedWriter
Sourcepub const fn cleanup_state(&self) -> RecoveryCleanupState
pub const fn cleanup_state(&self) -> RecoveryCleanupState
Returns cleanup progress; errors and cancellation do not release ownership.
§Returns
The latest cleanup state: Pending before cleanup, Running while an
attempt is active, Completed after confirmed cleanup, or
Indeterminate when cleanup did not finish conclusively. This cleanup
state is independent of destination publication certainty; an
Ok(WriteAbortOutcome::Indeterminate) confirms cleanup while leaving
destination publication unknown.
Sourcepub fn abort(&mut self) -> FsResult<WriteAbortOutcome>
pub fn abort(&mut self) -> FsResult<WriteAbortOutcome>
Explicitly cleans resources actually owned by this isolated session.
A failed attempt retains the session for explicit retry or reconciliation. This synchronous method may block in provider I/O.
§Errors
Returns InvalidState after confirmed cleanup, or the contextual provider error without replacing the original opening failure.
§Returns
The outcome reported by the provider after cleanup completes.