Expand description
Represents a collection of generic errors.
This struct contains a vector of Error types
that represent errors that have occured.
If ariadne is enabled, you can use Errors::eprint/print
to print all the errors to standard output.
Fields
errors: Vec<Error>Implementations
sourceimpl Errors
impl Errors
sourcepub fn to_reports(&self) -> impl Iterator<Item = Report> + '_
This is supported on crate feature ariadne only.
pub fn to_reports(&self) -> impl Iterator<Item = Report> + '_
This is supported on crate feature
ariadne only.Convert all errors into Reports.
sourcepub fn eprint(&self, cache: &mut SourceCache) -> Result<()>
This is supported on crate feature ariadne only.
pub fn eprint(&self, cache: &mut SourceCache) -> Result<()>
This is supported on crate feature
ariadne only.Print all the errors to stderr with ariadne.
sourcepub fn print(&self, cache: &mut SourceCache) -> Result<()>
This is supported on crate feature ariadne only.
pub fn print(&self, cache: &mut SourceCache) -> Result<()>
This is supported on crate feature
ariadne only.Print all the errors to stdout with ariadne.
Trait Implementations
sourceimpl Error for Errors
impl Error for Errors
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for Errors
impl !Send for Errors
impl !Sync for Errors
impl Unpin for Errors
impl !UnwindSafe for Errors
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more