pub enum MigrateError {
HeldStore {
path: PathBuf,
},
PendingDetached {
path: PathBuf,
},
PendingForDowngrade {
path: PathBuf,
},
PendingUnreadable {
path: PathBuf,
why: String,
},
BothCommitted {
source: PathBuf,
target: PathBuf,
},
BothExist {
source: PathBuf,
target: PathBuf,
},
Locked {
path: PathBuf,
},
Io {
op: &'static str,
path: PathBuf,
why: String,
},
Git {
args: String,
why: String,
},
}Expand description
Why a migration stopped. Its Display is the line a refused command
prints; the variants are what a caller or a test tells apart.
Variants§
HeldStore
A 3.x check parked unstaged changes here (forward), or a 4.0 one did (reverse): they are put back first, never moved.
PendingDetached
A detached cluster run 3.x submitted is still pending: its Workflow carries 3.x’s label, which 4.0 cannot collect.
PendingForDowngrade
A reverse, while a detached cluster run 4.0 submitted is pending: 3.x cannot collect it.
PendingUnreadable
The pending file of the version being left exists but cannot be read: its runs would be lost all the same, so the move waits.
BothCommitted
Both spellings of a committed file are in the work tree
(migrate --tracked): which one is meant is the repository’s call.
BothExist
Both spellings of one name exist and are not a log to merge.
Locked
Another process held the migration lock past its deadline.
Io
A file operation failed.
Git
git refused or could not run.
Implementations§
Source§impl MigrateError
impl MigrateError
Sourcepub fn staged_nothing(&self) -> bool
pub fn staged_nothing(&self) -> bool
Refused before anything moved, so nothing is staged or renamed: the order of the checks lives here, beside the code that sets it. Exhaustive on purpose: a new variant decides here which side it is on.
Trait Implementations§
Source§impl Clone for MigrateError
impl Clone for MigrateError
Source§impl Debug for MigrateError
impl Debug for MigrateError
Source§impl Display for MigrateError
impl Display for MigrateError
impl Eq for MigrateError
Source§impl Error for MigrateError
impl Error for MigrateError
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()