#[non_exhaustive]pub enum RevisionError {
NotFound {
spec: String,
},
NoMergeBase {
left: ObjectId,
right: ObjectId,
},
MultipleMergeBases {
left: ObjectId,
right: ObjectId,
},
Resolve(ResolveError),
Parse(RevParseError),
List(RevListError),
}Expand description
Revision failure: a name that resolves to nothing, a revision expression that does not parse, or a revision walk whose options are invalid.
Surfaced on the umbrella as Error::Revision.
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.
NotFound
A revision expression (branch, tag, object id, x~n, ORIG_HEAD, …) names nothing in
the repository.
NoMergeBase
Two commits share no common ancestor.
MultipleMergeBases
Two commits have more than one best common ancestor (criss-cross history), and the operation needs exactly one.
Resolve(ResolveError)
A revision spec could not be resolved to an object for inspection.
Parse(RevParseError)
Revision parsing failed.
List(RevListError)
Revision walking or rev-list option parsing failed.
Implementations§
Trait Implementations§
Source§impl Debug for RevisionError
impl Debug for RevisionError
Source§impl Display for RevisionError
impl Display for RevisionError
Source§impl Error for RevisionError
impl Error for RevisionError
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<ResolveError> for RevisionError
impl From<ResolveError> for RevisionError
Source§fn from(source: ResolveError) -> Self
fn from(source: ResolveError) -> Self
Converts to this type from the input type.
Source§impl From<RevListError> for RevisionError
impl From<RevListError> for RevisionError
Source§fn from(source: RevListError) -> Self
fn from(source: RevListError) -> Self
Converts to this type from the input type.
Source§impl From<RevParseError> for RevisionError
impl From<RevParseError> for RevisionError
Source§fn from(source: RevParseError) -> Self
fn from(source: RevParseError) -> Self
Converts to this type from the input type.
Source§impl From<RevisionError> for Error
impl From<RevisionError> for Error
Source§fn from(source: RevisionError) -> Self
fn from(source: RevisionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for RevisionError
impl Freeze for RevisionError
impl RefUnwindSafe for RevisionError
impl Send for RevisionError
impl Sync for RevisionError
impl Unpin for RevisionError
impl UnsafeUnpin for RevisionError
impl UnwindSafe for RevisionError
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