pub enum Error {
Payload(Error),
Container(Error),
ContainerChanged {
recorded: String,
found: String,
},
Repack(Error),
WouldNotBeConformant(String),
Swap(Error),
}Expand description
Why an edit did not reach the container.
Variants§
Payload(Error)
The payload could not be read out of the session directory.
Container(Error)
The container could not be read, or is no longer where the session recorded it. Concept 6.4: a container may move or go while a session runs, and this is not a failure of the edit.
ContainerChanged
The file at the recorded path is not the container this session was opened against — its payload goes by another name. Writing back would rename the payload of a container somebody else may be holding, so it refuses. Concept 6.3 asks the same question on the recovery side; this is the guard on the acting side, and it belongs here because it is a safety property of the write-back rather than an optimisation in whatever called it.
Fields
Repack(Error)
The repack itself failed. Nothing was replaced.
WouldNotBeConformant(String)
What the repack produced was not a conformant container, so it was not allowed to replace one. Nothing was changed.
Swap(Error)
The replacement could not be put in place. Includes the case concept 7 cares most about: the container carries a mark that could not be carried onto its replacement, which stops the commit rather than silently laundering it.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()