#[non_exhaustive]pub enum SourceError {
Show 13 variants
NoLocation,
EmptyPath,
RefWithoutGit,
TwoRefs,
Url {
url: String,
},
Rev {
rev: String,
},
Path(PathError),
NotAFile {
file: String,
},
NoGit,
NoRef {
url: String,
reference: String,
},
NoCommit {
url: String,
rev: Oid,
},
Credentials {
url: String,
},
Git {
command: String,
stderr: String,
},
}Expand description
Why a source cannot be read.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoLocation
Neither git nor path is set.
EmptyPath
A local path is empty.
RefWithoutGit
tag, branch or rev is set without git.
TwoRefs
More than one of tag, branch and rev is set.
Url
git is empty, or would reach git as an option.
Rev
rev is not a full commit id.
Path(PathError)
path within a repository is not a RelPath.
NotAFile
A file the profile lists is a symlink, a directory or a submodule.
NoGit
git is not on PATH.
NoRef
The remote has no such branch or tag, or no default branch.
Fields
NoCommit
The remote has no commit with the pinned id.
Credentials
The remote needs credentials that git could not get.
Git
A git command failed.
Trait Implementations§
Source§impl Clone for SourceError
impl Clone for SourceError
Source§impl Debug for SourceError
impl Debug for SourceError
Source§impl Display for SourceError
impl Display for SourceError
impl Eq for SourceError
Source§impl Error for SourceError
impl Error for SourceError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<PathError> for SourceError
impl From<PathError> for SourceError
Source§impl From<SourceError> for Error
impl From<SourceError> for Error
Source§fn from(source: SourceError) -> Self
fn from(source: SourceError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SourceError
impl PartialEq for SourceError
impl StructuralPartialEq for SourceError
Auto Trait Implementations§
impl Freeze for SourceError
impl RefUnwindSafe for SourceError
impl Send for SourceError
impl Sync for SourceError
impl Unpin for SourceError
impl UnsafeUnpin for SourceError
impl UnwindSafe for SourceError
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
Mutably borrows from an owned value. Read more
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.