pub struct ParseErrors {
pub errors: Vec<ParseError>,
pub sql: String,
}Expand description
Collection of parse errors
Fields§
§errors: Vec<ParseError>List of errors
sql: StringOriginal SQL string
Implementations§
Source§impl ParseErrors
impl ParseErrors
Sourcepub fn from_errors(errors: Vec<ParseError>) -> Self
pub fn from_errors(errors: Vec<ParseError>) -> Self
Create from a vector of errors
Sourcepub fn from_errors_with_sql(
errors: Vec<ParseError>,
sql: impl Into<String>,
) -> Self
pub fn from_errors_with_sql( errors: Vec<ParseError>, sql: impl Into<String>, ) -> Self
Create from errors while retaining the original SQL source.
Sourcepub fn push(&mut self, error: ParseError)
pub fn push(&mut self, error: ParseError)
Add an error
Sourcepub fn format_errors(&self) -> String
pub fn format_errors(&self) -> String
Format all errors for display
Trait Implementations§
Source§impl Clone for ParseErrors
impl Clone for ParseErrors
Source§fn clone(&self) -> ParseErrors
fn clone(&self) -> ParseErrors
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ParseErrors
impl Debug for ParseErrors
Source§impl Display for ParseErrors
impl Display for ParseErrors
Source§impl Error for ParseErrors
impl Error for ParseErrors
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()
Auto Trait Implementations§
impl Freeze for ParseErrors
impl RefUnwindSafe for ParseErrors
impl Send for ParseErrors
impl Sync for ParseErrors
impl Unpin for ParseErrors
impl UnsafeUnpin for ParseErrors
impl UnwindSafe for ParseErrors
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