#[non_exhaustive]pub enum EditError<I: ApplicationInfo> {
Show 16 variants
NeedConfirm(Box<dyn Dialog<Action<I>>>),
NoCursorWord,
NoSearch,
NoSelection,
InvalidDigraph(char, char),
InvalidRegex(Error),
MarkNotSet(Mark),
WrongBuffer(I::ContentId),
CursorGroupCombine(CursorGroupCombineError),
IntConversionError(TryFromIntError),
IntParseError(ParseIntError),
ReadOnly,
Unimplemented(String),
MacroFailure(MacroError),
Register(RegisterError),
Failure(String),
}
Expand description
Errors returned from editing operation.
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.
NeedConfirm(Box<dyn Dialog<Action<I>>>)
Run an interactive dialog to determine how to complete this action.
NoCursorWord
Failure to fetch a word at a cursor position.
NoSearch
Failure to determine a search expression to use.
NoSelection
Failure due to lack of a current selection.
InvalidDigraph(char, char)
Failure due to an umapped digraph.
InvalidRegex(Error)
Failure due to a bad regular expression.
MarkNotSet(Mark)
Failure due to an unset Mark.
WrongBuffer(I::ContentId)
Failure due to referencing a cursor position in another buffer.
CursorGroupCombine(CursorGroupCombineError)
Failure while combining cursor groups.
IntConversionError(TryFromIntError)
Failure due to invalid input where an integer was expected.
IntParseError(ParseIntError)
Failure due to invalid input where an integer was expected.
ReadOnly
Failure due to an unimplemented feature.
Unimplemented(String)
Failure due to an unimplemented feature.
MacroFailure(MacroError)
Macro-related failure.
Register(RegisterError)
Error while getting or putting a value into the register store.
Failure(String)
Generic failure.
Trait Implementations§
source§impl<I: ApplicationInfo> Display for EditError<I>
impl<I: ApplicationInfo> Display for EditError<I>
source§impl<I: ApplicationInfo> Error for EditError<I>
impl<I: ApplicationInfo> Error for EditError<I>
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<I: ApplicationInfo> From<CursorGroupCombineError> for EditError<I>
impl<I: ApplicationInfo> From<CursorGroupCombineError> for EditError<I>
source§fn from(source: CursorGroupCombineError) -> Self
fn from(source: CursorGroupCombineError) -> Self
Converts to this type from the input type.
source§impl<I: ApplicationInfo> From<MacroError> for EditError<I>
impl<I: ApplicationInfo> From<MacroError> for EditError<I>
source§fn from(source: MacroError) -> Self
fn from(source: MacroError) -> Self
Converts to this type from the input type.
source§impl<I: ApplicationInfo> From<ParseIntError> for EditError<I>
impl<I: ApplicationInfo> From<ParseIntError> for EditError<I>
source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
source§impl<I: ApplicationInfo> From<RegisterError> for EditError<I>
impl<I: ApplicationInfo> From<RegisterError> for EditError<I>
source§fn from(source: RegisterError) -> Self
fn from(source: RegisterError) -> Self
Converts to this type from the input type.
source§impl<I: ApplicationInfo> From<TryFromIntError> for EditError<I>
impl<I: ApplicationInfo> From<TryFromIntError> for EditError<I>
source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<I> Freeze for EditError<I>
impl<I> !RefUnwindSafe for EditError<I>
impl<I> Send for EditError<I>
impl<I> !Sync for EditError<I>
impl<I> Unpin for EditError<I>
impl<I> !UnwindSafe for EditError<I>
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.