pub struct ErrorCollector(/* private fields */);
Expand description
An internal structure to track list of errors
It’s exposed only to handler of include file. Use ErrorCollector
to submit your errors from include file handler.
Implementations§
Source§impl ErrorCollector
impl ErrorCollector
Sourcepub fn new() -> ErrorCollector
pub fn new() -> ErrorCollector
New error collector
Sourcepub fn into_fatal(&self, err: Error) -> ErrorList
pub fn into_fatal(&self, err: Error) -> ErrorList
Adds fatal (final) error into collection and return error list
Sourcepub fn into_result<T>(&self, val: T) -> Result<T, ErrorList>
pub fn into_result<T>(&self, val: T) -> Result<T, ErrorList>
Converts collector into Ok(val)
if no errors reported, into Err
otherwise
Trait Implementations§
Source§impl Clone for ErrorCollector
impl Clone for ErrorCollector
Source§fn clone(&self) -> ErrorCollector
fn clone(&self) -> ErrorCollector
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for ErrorCollector
impl !RefUnwindSafe for ErrorCollector
impl !Send for ErrorCollector
impl !Sync for ErrorCollector
impl Unpin for ErrorCollector
impl !UnwindSafe for ErrorCollector
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