pub enum CodeChangeValidationError {
InvalidPath,
TooManyHunks,
TooManyLines,
InvalidHunkLines,
LineTooLong,
InvalidLineNumbers,
InconsistentHunkRange,
PatchTooLong,
InvalidFirstChangedLine,
InconsistentTruncation,
}Expand description
Validation failure for a structured code-change presentation.
Variants§
InvalidPath
File path is empty, contains a NUL, or exceeds its byte bound.
TooManyHunks
The hunk count exceeds its bound.
TooManyLines
The total line count exceeds its bound.
InvalidHunkLines
One hunk has no lines or exceeds its line bound.
LineTooLong
One line exceeds its byte bound.
InvalidLineNumbers
One line’s kind and old/new line numbers are inconsistent.
InconsistentHunkRange
Hunk start/count fields do not match their retained lines.
PatchTooLong
The optional unified patch exceeds its byte bound.
InvalidFirstChangedLine
The optional first changed line must be one-based.
InconsistentTruncation
Truncation must have exactly one reason when it is set.
Trait Implementations§
Source§impl Clone for CodeChangeValidationError
impl Clone for CodeChangeValidationError
Source§fn clone(&self) -> CodeChangeValidationError
fn clone(&self) -> CodeChangeValidationError
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 moreimpl Copy for CodeChangeValidationError
Source§impl Debug for CodeChangeValidationError
impl Debug for CodeChangeValidationError
Source§impl Display for CodeChangeValidationError
impl Display for CodeChangeValidationError
impl Eq for CodeChangeValidationError
Source§impl Error for CodeChangeValidationError
impl Error for CodeChangeValidationError
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()
impl StructuralPartialEq for CodeChangeValidationError
Auto Trait Implementations§
impl Freeze for CodeChangeValidationError
impl RefUnwindSafe for CodeChangeValidationError
impl Send for CodeChangeValidationError
impl Sync for CodeChangeValidationError
impl Unpin for CodeChangeValidationError
impl UnsafeUnpin for CodeChangeValidationError
impl UnwindSafe for CodeChangeValidationError
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