pub enum InquireError {
NotTTY,
InvalidConfiguration(String),
IO(Error),
OperationCanceled,
OperationInterrupted,
}
Expand description
Possible errors returned by inquire
prompts.
Variants
NotTTY
The input device is not a TTY, which means that enabling raw mode on the terminal in order to listen to input events is not possible.
InvalidConfiguration(String)
The given prompt configuration is not valid. A detailed error message is contained in the value string.
IO(Error)
Error while executing IO operations.
OperationCanceled
The user canceled the operation by pressing ESC.
OperationInterrupted
The operation was interrupted by the user after they pressed Ctrl+C.
This error will be returned only when using crossterm
or termion
as the terminal back-end. If using console
,
pressing Ctrl+C will trigger SIGINT.
Trait Implementations
sourceimpl Debug for InquireError
impl Debug for InquireError
sourceimpl Display for InquireError
impl Display for InquireError
sourceimpl Error for InquireError
impl Error for InquireError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Error> for InquireError
impl From<Error> for InquireError
sourcefn from(source: Error) -> InquireError
fn from(source: Error) -> InquireError
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for InquireError
impl Send for InquireError
impl Sync for InquireError
impl Unpin for InquireError
impl !UnwindSafe for InquireError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more