#[non_exhaustive]pub enum InitError {
AlreadyExists(PathBuf),
InvalidBranch(String),
Io {
path: PathBuf,
source: Error,
},
Reftable(Error),
Open(OpenError),
}Expand description
Initialization refusal, filesystem failure, or final metadata validation failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AlreadyExists(PathBuf)
A destination or repository marker already exists; it was not modified. Open the existing repository or choose a new destination; do not retry initialization as repair.
InvalidBranch(String)
The initial branch name is not a valid branch name. Supply a valid short branch name without the refs/heads/ prefix.
Io
A filesystem operation failed. Newly created files may remain; see Repository::init.
Inspect the path and source and retain partial new metadata for diagnosis; exclude other
writers before inspecting or cleaning up only the metadata created by this attempt.
Reinitializing a remaining partial destination will be refused as already existing.
Reftable(Error)
Reftable initial-record encoding failed; newly created metadata may remain. Inspect the codec source and any partial newly created metadata before retrying.
Open(OpenError)
Inspecting existing metadata or opening the newly created repository failed. Inspect the opening source; existing metadata is untouched, while newly created partial metadata can remain.
Trait Implementations§
Source§impl Error for InitError
impl Error for InitError
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()