pub struct ErrorReports(/* private fields */);Expand description
A collection of error reports.
Implementations§
Source§impl ErrorReports
impl ErrorReports
Sourcepub fn iter(&self) -> impl Iterator<Item = &ErrorReport>
pub fn iter(&self) -> impl Iterator<Item = &ErrorReport>
Iterates over the collection.
Sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserves capacity for at least additional more elements to be inserted in the collection.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Construct a new empty collection with the specified capacity.
Source§impl ErrorReports
impl ErrorReports
Sourcepub fn push(&mut self, report: ErrorReport)
pub fn push(&mut self, report: ErrorReport)
Add a new error report to the collection.
Sourcepub fn pop(&mut self) -> Option<ErrorReport>
pub fn pop(&mut self) -> Option<ErrorReport>
Remove and return the last error report.
Sourcepub fn get_mut(&mut self, index: usize) -> Option<&mut ErrorReport>
pub fn get_mut(&mut self, index: usize) -> Option<&mut ErrorReport>
Get a mutable reference to a report at a specific index.
Sourcepub fn replace(&mut self, index: usize, report: ErrorReport)
pub fn replace(&mut self, index: usize, report: ErrorReport)
Replace a report at a specific index.
Sourcepub fn sort_by_span(&mut self)
pub fn sort_by_span(&mut self)
Sort reports by their primary origin span start position.
Trait Implementations§
Source§impl Clone for ErrorReports
impl Clone for ErrorReports
Source§fn clone(&self) -> ErrorReports
fn clone(&self) -> ErrorReports
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ErrorReports
impl Debug for ErrorReports
Source§impl Default for ErrorReports
impl Default for ErrorReports
Source§fn default() -> ErrorReports
fn default() -> ErrorReports
Returns the “default value” for a type. Read more
Source§impl Display for ErrorReports
impl Display for ErrorReports
Source§impl Error for ErrorReports
impl Error for ErrorReports
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 Extend<ErrorReport> for ErrorReports
impl Extend<ErrorReport> for ErrorReports
Source§fn extend<I: IntoIterator<Item = ErrorReport>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = ErrorReport>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl From<ErrorReports> for Vec<ErrorReport>
impl From<ErrorReports> for Vec<ErrorReport>
Source§fn from(new_type_instance: ErrorReports) -> Vec<ErrorReport>
fn from(new_type_instance: ErrorReports) -> Vec<ErrorReport>
Converts to this type from the input type.
Source§impl From<Vec<ErrorReport>> for ErrorReports
impl From<Vec<ErrorReport>> for ErrorReports
Source§fn from(field: Vec<ErrorReport>) -> Self
fn from(field: Vec<ErrorReport>) -> Self
Converts to this type from the input type.
Source§impl FromIterator<ErrorReport> for ErrorReports
impl FromIterator<ErrorReport> for ErrorReports
Source§fn from_iter<I: IntoIterator<Item = ErrorReport>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = ErrorReport>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl Index<usize> for ErrorReports
impl Index<usize> for ErrorReports
Source§impl<'plural> IntoIterator for &'plural ErrorReports
impl<'plural> IntoIterator for &'plural ErrorReports
Source§impl IntoIterator for ErrorReports
impl IntoIterator for ErrorReports
Source§impl PartialEq for ErrorReports
impl PartialEq for ErrorReports
impl StructuralPartialEq for ErrorReports
Auto Trait Implementations§
impl Freeze for ErrorReports
impl RefUnwindSafe for ErrorReports
impl Send for ErrorReports
impl Sync for ErrorReports
impl Unpin for ErrorReports
impl UnwindSafe for ErrorReports
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<E> Context<TracedError> for Ewhere
E: AnyError,
impl<E> Context<TracedError> for Ewhere
E: AnyError,
Source§fn context<C>(self, context: C) -> TracedError
fn context<C>(self, context: C) -> TracedError
Adds additional context. This becomes a no-op if the
traced feature is disabled.Source§fn with_context<F, C>(self, context: F) -> TracedError
fn with_context<F, C>(self, context: F) -> TracedError
Lazily adds additional context. This becomes a no-op if the
traced feature is disabled.Source§impl<E1, E2> IntoTraced<TracedError<E2>> for E1
impl<E1, E2> IntoTraced<TracedError<E2>> for E1
Source§fn into_traced(self) -> TracedError<E2>
fn into_traced(self) -> TracedError<E2>
Convert Error to a type containing a
TracedError mapping the underlying typeSource§impl<E> Traced<TracedError<E>> for Ewhere
E: AnyError,
impl<E> Traced<TracedError<E>> for Ewhere
E: AnyError,
Source§fn traced(self) -> TracedError<E>
fn traced(self) -> TracedError<E>
Convert Error to a type containing a
TracedError keeping the underlying typeSource§impl<E> TracedDyn<TracedError> for Ewhere
E: AnyError,
impl<E> TracedDyn<TracedError> for Ewhere
E: AnyError,
Source§fn traced_dyn(self) -> TracedError
fn traced_dyn(self) -> TracedError
Convert Error to
TracedError without caring about the underlying type