pub enum InternalError {
UnreachableCode {
file: &'static str,
line: u32,
column: u32,
},
InvalidLineText(LineTextError),
}
Expand description
Defines non-user errors
Expected to report reaching unreachable code, over-/under-flow, etc., if such is caught. The recommendation when receiving any of these will be: “Save your work, close the editor, and create an issue at https://github.com/sidju/add-ed which describes what you did to trigger this error”.
Variants§
UnreachableCode
A code path that shouldn’t be reachable was reached. We use this error instead of panic to not drop buffer without letting user save
InvalidLineText(LineTextError)
add-ed
internal code tried to create a line from invalid text data. This
should never occur and indicates a logic bug within add-ed
.
Trait Implementations§
Source§impl Clone for InternalError
impl Clone for InternalError
Source§fn clone(&self) -> InternalError
fn clone(&self) -> InternalError
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InternalError
impl Debug for InternalError
Source§impl From<InternalError> for EdError
impl From<InternalError> for EdError
Source§fn from(e: InternalError) -> Self
fn from(e: InternalError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InternalError
impl PartialEq for InternalError
impl StructuralPartialEq for InternalError
Auto Trait Implementations§
impl Freeze for InternalError
impl RefUnwindSafe for InternalError
impl Send for InternalError
impl Sync for InternalError
impl Unpin for InternalError
impl UnwindSafe for InternalError
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