pub struct ErrorAggregator { /* private fields */ }Expand description
Aggregate multiple errors into a single error
Implementations§
Source§impl ErrorAggregator
impl ErrorAggregator
Sourcepub fn add(&mut self, error: OxiGdalError)
pub fn add(&mut self, error: OxiGdalError)
Add an error to the aggregator
Sourcepub fn add_result<T>(&mut self, result: Result<T>) -> Option<T>
pub fn add_result<T>(&mut self, result: Result<T>) -> Option<T>
Add a result, collecting any errors
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Check if any errors were collected
Sourcepub fn into_result(self) -> Result<()>
pub fn into_result(self) -> Result<()>
Convert to a result, failing if any errors were collected
Sourcepub fn into_errors(self) -> Vec<OxiGdalError>
pub fn into_errors(self) -> Vec<OxiGdalError>
Get all collected errors
Trait Implementations§
Source§impl Debug for ErrorAggregator
impl Debug for ErrorAggregator
Auto Trait Implementations§
impl Freeze for ErrorAggregator
impl RefUnwindSafe for ErrorAggregator
impl Send for ErrorAggregator
impl Sync for ErrorAggregator
impl Unpin for ErrorAggregator
impl UnsafeUnpin for ErrorAggregator
impl UnwindSafe for ErrorAggregator
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