Skip to main content

RejectedWriter

Struct RejectedWriter 

Source
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::RecoveryCleanupState;
use qubit_fs::write::RejectedWriter;

assert!(std::any::type_name::<RejectedWriter>().contains("RejectedWriter"));
assert_eq!(RecoveryCleanupState::Pending, RecoveryCleanupState::Pending);

Implementations§

Source§

impl RejectedWriter

Source

pub const fn cleanup_state(&self) -> RecoveryCleanupState

Returns cleanup progress; errors and cancellation do not release ownership.

Source

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.

Trait Implementations§

Source§

impl Debug for RejectedWriter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Omits the session and unvalidated provider identity.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.