Enum add_ed::error::InternalError
source · 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 copy of the value. Read more
1.0.0 · 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 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
source§fn eq(&self, other: &InternalError) -> bool
fn eq(&self, other: &InternalError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for InternalError
Auto Trait Implementations§
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