pub struct ErrorReport { /* private fields */ }Expand description
Ordered failures collected while authoring or compiling one value.
A report is the fatal counterpart of Diagnostics, which carries the
non-fatal warnings of the same step. Error always describes exactly one failure; fluent
builders retain their deferred failures here and return the whole report from build.
At most 1024 errors are kept; later ones are dropped. Reports passed to
ErrorReport::record are flattened so callers see individual failures. Converting a report
with ? into Error keeps it reachable through Error::report.
use motion_core::{Error, ErrorReport};
let mut report = ErrorReport::default();
report.record(Error::from(std::io::Error::other("disk failure")));
assert_eq!(report.len(), 1);Implementations§
Source§impl ErrorReport
impl ErrorReport
Trait Implementations§
Source§impl Clone for ErrorReport
impl Clone for ErrorReport
Source§impl Debug for ErrorReport
impl Debug for ErrorReport
Source§impl Default for ErrorReport
impl Default for ErrorReport
Source§impl Display for ErrorReport
impl Display for ErrorReport
Source§impl Error for ErrorReport
impl Error for ErrorReport
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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 From<Box<dyn Error + Sync + Send>> for ErrorReport
impl From<Box<dyn Error + Sync + Send>> for ErrorReport
Source§fn from(error: BoxedError) -> Self
fn from(error: BoxedError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ErrorReport
impl From<Error> for ErrorReport
Source§impl From<Error> for ErrorReport
impl From<Error> for ErrorReport
Source§impl From<ErrorReport> for Error
impl From<ErrorReport> for Error
Source§fn from(report: ErrorReport) -> Self
fn from(report: ErrorReport) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for ErrorReport
impl From<ValidationError> for ErrorReport
Source§fn from(error: ValidationError) -> Self
fn from(error: ValidationError) -> Self
Converts to this type from the input type.
Source§impl IntoIterator for ErrorReport
impl IntoIterator for ErrorReport
Source§impl<'a> IntoIterator for &'a ErrorReport
impl<'a> IntoIterator for &'a ErrorReport
Auto Trait Implementations§
impl !RefUnwindSafe for ErrorReport
impl !UnwindSafe for ErrorReport
impl Forget for ErrorReport
impl Freeze for ErrorReport
impl Move for ErrorReport
impl Send for ErrorReport
impl Sync for ErrorReport
impl Unpin for ErrorReport
impl UnsafeUnpin for ErrorReport
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