pub struct PersistFailure { /* private fields */ }Expand description
Persistence error paired with provider-confirmed partial progress.
§Examples
use qubit_fs::error::{FsError, FsErrorKind, FsOperation};
use qubit_fs::temp::{PersistFailure, PersistFailureState};
let failure = PersistFailure::new(
FsError::new(FsErrorKind::Io, FsOperation::PersistTemp, "failed"),
PersistFailureState::NotPublished,
);
assert_eq!(PersistFailureState::NotPublished, failure.state());Implementations§
Source§impl PersistFailure
impl PersistFailure
Sourcepub fn new(error: FsError, state: PersistFailureState) -> Self
pub fn new(error: FsError, state: PersistFailureState) -> Self
Sourcepub const fn state(&self) -> PersistFailureState
pub const fn state(&self) -> PersistFailureState
Sourcepub const fn error(&self) -> &FsError
pub const fn error(&self) -> &FsError
Returns the underlying filesystem error.
§Returns
The error with operation, path, provider, and source context.
Sourcepub fn publication_target(&self) -> Option<&Path>
pub fn publication_target(&self) -> Option<&Path>
Returns the target associated with the retained recovery fact.
Sourcepub fn into_error(self) -> FsError
pub fn into_error(self) -> FsError
Consumes this failure and returns the underlying filesystem error.
§Returns
The owned filesystem error.
Sourcepub fn into_parts(self) -> (FsError, PersistFailureState)
pub fn into_parts(self) -> (FsError, PersistFailureState)
Splits this facade failure into its causal error and state.
Sourcepub fn into_recovery_parts(self) -> (FsError, PersistFailureState, Option<Path>)
pub fn into_recovery_parts(self) -> (FsError, PersistFailureState, Option<Path>)
Consumes the failure and returns its complete recovery snapshot.
Trait Implementations§
Source§impl Debug for PersistFailure
impl Debug for PersistFailure
Source§impl Display for PersistFailure
impl Display for PersistFailure
Source§impl Error for PersistFailure
impl Error for PersistFailure
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for PersistFailure
impl !UnwindSafe for PersistFailure
impl Freeze for PersistFailure
impl Send for PersistFailure
impl Sync for PersistFailure
impl Unpin for PersistFailure
impl UnsafeUnpin for PersistFailure
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more