pub struct FieldError { /* private fields */ }Expand description
Why a field section could not be interpreted, naming the field and its position in the original section.
The name is the section’s own lowercase spelling of a declared or forbidden field. The name of an unknown field is untrusted input, so it is never included; nor is any value.
Implementations§
Source§impl FieldError
impl FieldError
Sourcepub fn name(&self) -> Option<&'static str>
pub fn name(&self) -> Option<&'static str>
The field’s lowercase name, or None for an unknown field, whose name is untrusted.
Sourcepub fn position(&self) -> Option<usize>
pub fn position(&self) -> Option<usize>
The position of the offending field in the original section, or None for a missing field, which has no position.
Sourcepub fn kind(&self) -> FieldErrorKind
pub fn kind(&self) -> FieldErrorKind
What went wrong.
Trait Implementations§
Source§impl Clone for FieldError
impl Clone for FieldError
Source§impl Debug for FieldError
impl Debug for FieldError
Source§impl Display for FieldError
impl Display for FieldError
impl Eq for FieldError
Source§impl Error for FieldError
impl Error for FieldError
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 Hash for FieldError
impl Hash for FieldError
Source§impl PartialEq for FieldError
impl PartialEq for FieldError
impl StructuralPartialEq for FieldError
Auto Trait Implementations§
impl Forget for FieldError
impl Freeze for FieldError
impl RefUnwindSafe for FieldError
impl Send for FieldError
impl Sync for FieldError
impl Unpin for FieldError
impl UnsafeUnpin for FieldError
impl UnwindSafe for FieldError
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