pub struct AtomicError {
pub step: AtomicStep,
pub path: PathBuf,
pub source: Option<Error>,
}Expand description
A failed atomic installation: which step, which path, and the OS error.
Fields§
§step: AtomicStepThe step that failed.
path: PathBufThe path that step was about — the target, its temporary file, or the parent directory, depending on the step.
source: Option<Error>The underlying OS error, absent only where the step had none.
Implementations§
Source§impl AtomicError
impl AtomicError
Sourcepub fn target_exists(&self) -> bool
pub fn target_exists(&self) -> bool
Whether this is a new_only write refusing an
existing target, which is a caller-visible outcome rather than an I/O
fault. The target was not touched. Never true for a replacing write.
Sourcepub fn commit_uncertain(&self) -> bool
pub fn commit_uncertain(&self) -> bool
Whether the target may already carry the new bytes.
Only the final directory fsync can fail after the installation itself succeeded: the file is complete and in place, but its survival across a crash is unconfirmed. Every other step fails before the install and leaves the original untouched.
Trait Implementations§
Source§impl Debug for AtomicError
impl Debug for AtomicError
Source§impl Display for AtomicError
impl Display for AtomicError
Source§impl Error for AtomicError
impl Error for AtomicError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()