pub enum InputError<E: Debug> {
Io(Error),
Parse(E),
}
Expand description
A custom error type for input operations that can represent I/O or parse errors.
This type provides a convenient way to distinguish whether a failure occurred due to an I/O problem (like a closed or unreadable stdin), or because the input could not be parsed into the desired type.
Variants§
Io(Error)
An error related to reading from standard input (I/O error).
Parse(E)
An error related to parsing the input string into the desired type.
Trait Implementations§
Source§impl<E: Debug + Display> Error for InputError<E>
impl<E: Debug + Display> Error for InputError<E>
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()
Auto Trait Implementations§
impl<E> Freeze for InputError<E>where
E: Freeze,
impl<E> !RefUnwindSafe for InputError<E>
impl<E> Send for InputError<E>where
E: Send,
impl<E> Sync for InputError<E>where
E: Sync,
impl<E> Unpin for InputError<E>where
E: Unpin,
impl<E> !UnwindSafe for InputError<E>
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