pub struct MismatchError {
pub message: String,
pub details: MismatchDetails,
}Expand description
Raised when a hashline section’s snapshot tag doesn’t match the live file’s
content (and recovery, if configured, declined the merge). Implements
std::error::Error; its Display is the formatted
diagnostic produced by format_message.
Fields§
§message: StringPre-formatted diagnostic (header + anchored context).
details: MismatchDetailsStructured context behind the diagnostic.
Implementations§
Source§impl MismatchError
impl MismatchError
Sourcepub fn new(details: MismatchDetails) -> Self
pub fn new(details: MismatchDetails) -> Self
Build the error, computing its message from details.
Sourcepub fn display_message(&self) -> &str
pub fn display_message(&self) -> &str
The formatted diagnostic (alias for the Display
rendering).
Trait Implementations§
Source§impl Clone for MismatchError
impl Clone for MismatchError
Source§fn clone(&self) -> MismatchError
fn clone(&self) -> MismatchError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MismatchError
impl Debug for MismatchError
Source§impl Display for MismatchError
impl Display for MismatchError
Source§impl Error for MismatchError
impl Error for MismatchError
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()
Auto Trait Implementations§
impl Freeze for MismatchError
impl RefUnwindSafe for MismatchError
impl Send for MismatchError
impl Sync for MismatchError
impl Unpin for MismatchError
impl UnsafeUnpin for MismatchError
impl UnwindSafe for MismatchError
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