#[non_exhaustive]pub struct InputError {
pub name: String,
pub problems: Vec<Problem>,
/* private fields */
}Available on crate features
input-toml or input-yaml only.Expand description
Why an input was refused: every problem found, each placed on a line when the text allows it.
Display prints one problem per line as name:line:column: field: message,
leaving out what is not known.
A file that could not be read keeps its io::ErrorKind, which
Self::io_failure returns. So a caller can treat a missing file apart
from a refused one. A field can join this type in a minor release.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe input’s name, usually its path.
problems: Vec<Problem>What is wrong, in the order found.
Implementations§
Source§impl InputError
impl InputError
Sourcepub const fn io_failure(&self) -> Option<ErrorKind>
pub const fn io_failure(&self) -> Option<ErrorKind>
The I/O failure when the file could not be read, such as
io::ErrorKind::NotFound. None when the text was read and refused.
Trait Implementations§
Source§impl Clone for InputError
impl Clone for InputError
Source§impl Debug for InputError
impl Debug for InputError
Source§impl Display for InputError
One problem per line: name:line:column: field: message, leaving out
what is not known.
impl Display for InputError
One problem per line: name:line:column: field: message, leaving out
what is not known.
impl Eq for InputError
Source§impl Error for InputError
impl Error for InputError
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()
Source§impl PartialEq for InputError
impl PartialEq for InputError
impl StructuralPartialEq for InputError
Auto Trait Implementations§
impl Forget for InputError
impl Freeze for InputError
impl Move for InputError
impl RefUnwindSafe for InputError
impl Send for InputError
impl Sync for InputError
impl Unpin for InputError
impl UnsafeUnpin for InputError
impl UnwindSafe for InputError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, O> Matches<O> for Twhere
T: PartialEq<O>,
impl<T, O> Matches<O> for Twhere
T: PartialEq<O>,
fn validate_matches(&self, other: &O) -> bool
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more