pub struct ErrorCollection {
pub errors: Vec<ErrorContext>,
pub warnings: Vec<String>,
}
Expand description
Aggregate multiple errors for batch processing
Fields§
§errors: Vec<ErrorContext>
§warnings: Vec<String>
Implementations§
Source§impl ErrorCollection
impl ErrorCollection
pub fn new() -> Self
pub fn add_error(&mut self, error: ErrorContext)
pub fn add_warning(&mut self, warning: String)
pub fn has_errors(&self) -> bool
pub fn has_warnings(&self) -> bool
pub fn error_count(&self) -> usize
pub fn warning_count(&self) -> usize
Trait Implementations§
Source§impl Clone for ErrorCollection
impl Clone for ErrorCollection
Source§fn clone(&self) -> ErrorCollection
fn clone(&self) -> ErrorCollection
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 ErrorCollection
impl Debug for ErrorCollection
Source§impl Default for ErrorCollection
impl Default for ErrorCollection
Source§impl<'de> Deserialize<'de> for ErrorCollection
impl<'de> Deserialize<'de> for ErrorCollection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ErrorCollection
impl RefUnwindSafe for ErrorCollection
impl Send for ErrorCollection
impl Sync for ErrorCollection
impl Unpin for ErrorCollection
impl UnwindSafe for ErrorCollection
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