pub struct Report { /* private fields */ }Expand description
All problems of an input.
A report is the result of a Validation, it lists the issues in the
order they appear in the input. Its display output lists them one per
line.
Implementations§
Source§impl Report
impl Report
Sourcepub fn from_error(err: &Error) -> Report
pub fn from_error(err: &Error) -> Report
Creates the report of the errors an error holds.
Sourcepub fn resolve_positions(&mut self, source: &[u8])
pub fn resolve_positions(&mut self, source: &[u8])
Resolves the offsets of the issues without lines and columns.
The source is the input the offsets refer to. Issues of values
that kept their errors (see Validated) only
have lines and columns if the format provides the source (see
deser_location). This resolves them otherwise.
Trait Implementations§
Source§impl Error for Report
impl Error for Report
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<'a> IntoIterator for &'a Report
impl<'a> IntoIterator for &'a Report
impl StructuralPartialEq for Report
Auto Trait Implementations§
impl Freeze for Report
impl RefUnwindSafe for Report
impl Send for Report
impl Sync for Report
impl Unpin for Report
impl UnsafeUnpin for Report
impl UnwindSafe for Report
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