pub enum InputError<E> {
Io(Error),
Parse(E),
Eof,
}
Expand description
A unified error type indicating either an I/O error, a parse error, or EOF.
Variants§
Io(Error)
An I/O error occurred (e.g., closed stdin).
Parse(E)
Failed to parse the input into the desired type.
Eof
EOF encountered (read_line returned 0).
Trait Implementations§
Source§impl<E: Debug> Debug for InputError<E>
impl<E: Debug> Debug for InputError<E>
Source§impl<E: Display + Debug> Error for InputError<E>
impl<E: Display + Debug> 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