pub struct SourceInfoErrors { /* private fields */ }Expand description
A helper struct to provide proper line based error/linting messages.
Provides a list of SourceInfoErrors and the SRCINFO data in which the errors occurred.
Implementations§
Source§impl SourceInfoErrors
impl SourceInfoErrors
Sourcepub fn new(errors: Vec<SourceInfoError>, file_content: String) -> Self
pub fn new(errors: Vec<SourceInfoError>, file_content: String) -> Self
Creates a new SourceInfoErrors.
Sourcepub fn errors(&self) -> &Vec<SourceInfoError>
pub fn errors(&self) -> &Vec<SourceInfoError>
Returns a reference to the list of errors.
Sourcepub fn check_unrecoverable_errors(self) -> Result<(), Error>
pub fn check_unrecoverable_errors(self) -> Result<(), Error>
Filters for and errors on unrecoverable errors.
Consumes self and simply returns if self contains no SourceInfoError of type
SourceInfoErrorType::Unrecoverable.
§Errors
Returns an error if self contains any SourceInfoError of type
SourceInfoErrorType::Unrecoverable.
Trait Implementations§
Source§impl Clone for SourceInfoErrors
impl Clone for SourceInfoErrors
Source§fn clone(&self) -> SourceInfoErrors
fn clone(&self) -> SourceInfoErrors
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 moreSource§impl Debug for SourceInfoErrors
impl Debug for SourceInfoErrors
Auto Trait Implementations§
impl Freeze for SourceInfoErrors
impl RefUnwindSafe for SourceInfoErrors
impl Send for SourceInfoErrors
impl Sync for SourceInfoErrors
impl Unpin for SourceInfoErrors
impl UnwindSafe for SourceInfoErrors
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