#[non_exhaustive]pub enum SubmoduleError {
EmptyPath,
SymlinkInPath {
path: String,
component: String,
},
GitDirNameMismatch {
name: String,
git_dir: PathBuf,
},
GitDirNested {
name: String,
},
GitDirOutsideModules {
git_dir: PathBuf,
},
GitDirSegmentHasSlash {
git_dir: PathBuf,
},
GitDirInUse {
name: String,
git_dir: PathBuf,
},
GitDirCaseConflict {
name: String,
git_dir: PathBuf,
},
GitDirUnavailable {
name: String,
},
GitDirNotConfigured {
name: String,
},
HeadUnreadable {
path: String,
},
HeadCommitMissing {
path: String,
},
}Expand description
Submodule layout and state failures: where a submodule’s git directory lives and whether its checkout can be inspected.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyPath
The submodule path is empty.
SymlinkInPath
A component of the submodule path is a symbolic link, so the path could escape the work tree.
Fields
GitDirNameMismatch
A legacy submodule git dir (modules/<name>) does not end with /<name>.
GitDirNested
A submodule git dir lies inside another submodule’s git dir.
GitDirOutsideModules
An encoded submodule git dir has no modules/ path segment.
GitDirSegmentHasSlash
The segment after modules/ in an encoded submodule git dir contains /.
GitDirInUse
Another submodule already uses this git dir.
GitDirCaseConflict
This git dir differs from another submodule’s only by case, on a case-insensitive file system.
Every candidate git dir for a new submodule was invalid or already taken.
GitDirNotConfigured
submodulePathConfig is enabled but submodule.<name>.gitdir is not set.
HeadUnreadable
The submodule has an embedded git dir but its HEAD could not be read.
HeadCommitMissing
The submodule’s HEAD names an object that is missing or is not a commit.
Trait Implementations§
Source§impl Clone for SubmoduleError
impl Clone for SubmoduleError
Source§impl Debug for SubmoduleError
impl Debug for SubmoduleError
Source§impl Display for SubmoduleError
impl Display for SubmoduleError
impl Eq for SubmoduleError
Source§impl Error for SubmoduleError
impl Error for SubmoduleError
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()
Source§impl From<SubmoduleError> for Error
impl From<SubmoduleError> for Error
Source§fn from(source: SubmoduleError) -> Self
fn from(source: SubmoduleError) -> Self
Source§impl PartialEq for SubmoduleError
impl PartialEq for SubmoduleError
impl StructuralPartialEq for SubmoduleError
Auto Trait Implementations§
impl Freeze for SubmoduleError
impl RefUnwindSafe for SubmoduleError
impl Send for SubmoduleError
impl Sync for SubmoduleError
impl Unpin for SubmoduleError
impl UnsafeUnpin for SubmoduleError
impl UnwindSafe for SubmoduleError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.