pub struct Errors {
pub errors: Vec<Error>,
}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§
Source§impl Errors
impl Errors
Sourcepub fn to_reports(&self) -> impl Iterator<Item = Report> + '_
Available on crate feature ariadne only.
pub fn to_reports(&self) -> impl Iterator<Item = Report> + '_
ariadne only.Convert all errors into Reports.
Sourcepub fn eprint(&self, cache: &mut SourceCache) -> Result<()>
Available on crate feature ariadne only.
pub fn eprint(&self, cache: &mut SourceCache) -> Result<()>
ariadne only.Print all the errors to stderr with ariadne.
Sourcepub fn print(&self, cache: &mut SourceCache) -> Result<()>
Available on crate feature ariadne only.
pub fn print(&self, cache: &mut SourceCache) -> Result<()>
ariadne only.Print all the errors to stdout with ariadne.
Trait Implementations§
Source§impl Error for Errors
impl Error for Errors
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()
Auto Trait Implementations§
impl Freeze for Errors
impl !RefUnwindSafe for Errors
impl !Send for Errors
impl !Sync for Errors
impl Unpin for Errors
impl !UnwindSafe for Errors
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