#[non_exhaustive]pub enum ResolveError {
UnknownRevision {
spec: String,
},
AmbiguousShortObject {
spec: String,
candidates: Vec<AmbiguousObjectHint>,
},
AmbiguousChangeId {
spec: String,
candidates: Vec<AmbiguousChangeIdHint>,
},
PathNotInTree {
path: String,
revision: String,
},
RevisionRange {
spec: String,
},
WrongObjectKind {
spec: String,
found: ObjectKind,
expected: ObjectKind,
},
}Expand description
Failure resolving a revision spec for object inspection.
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.
UnknownRevision
The spec does not name a known revision or object.
AmbiguousShortObject
A short hex prefix matches more than one object and could not be disambiguated.
Fields
§
candidates: Vec<AmbiguousObjectHint>Candidate objects in Git hint order (type, then hex).
AmbiguousChangeId
A change-id prefix matches more than one commit.
Fields
§
candidates: Vec<AmbiguousChangeIdHint>Matching commits (oid, change id, subject).
PathNotInTree
A path component is missing from the tree named by the revision.
Fields
RevisionRange
The spec names a revision range or set, not a single object (git rev-parse --verify).
WrongObjectKind
The resolved object is not of the expected kind.
Trait Implementations§
Source§impl Debug for ResolveError
impl Debug for ResolveError
Source§impl Display for ResolveError
impl Display for ResolveError
Source§impl Error for ResolveError
impl Error for ResolveError
1.30.0 · 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<RevParseError> for ResolveError
impl From<RevParseError> for ResolveError
Source§fn from(value: RevParseError) -> Self
fn from(value: RevParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ResolveError
impl RefUnwindSafe for ResolveError
impl Send for ResolveError
impl Sync for ResolveError
impl Unpin for ResolveError
impl UnsafeUnpin for ResolveError
impl UnwindSafe for ResolveError
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