pub struct AnalyzerError {
pub kind: AnalyzerErrorKind,
pub span: Option<Span>,
}Expand description
An analyzer error with location information.
Fields§
§kind: AnalyzerErrorKindThe kind of error.
span: Option<Span>The source span where the error occurred.
Implementations§
Source§impl AnalyzerError
impl AnalyzerError
Sourcepub fn new(kind: AnalyzerErrorKind) -> Self
pub fn new(kind: AnalyzerErrorKind) -> Self
Create a new analyzer error.
Sourcepub fn with_span(kind: AnalyzerErrorKind, span: Span) -> Self
pub fn with_span(kind: AnalyzerErrorKind, span: Span) -> Self
Create a new analyzer error with a span.
Sourcepub fn table_not_found(name: impl Into<String>) -> Self
pub fn table_not_found(name: impl Into<String>) -> Self
Table not found.
Sourcepub fn column_not_found(name: impl Into<String>, table: Option<String>) -> Self
pub fn column_not_found(name: impl Into<String>, table: Option<String>) -> Self
Column not found.
Sourcepub fn ambiguous_column(name: impl Into<String>, tables: Vec<String>) -> Self
pub fn ambiguous_column(name: impl Into<String>, tables: Vec<String>) -> Self
Ambiguous column.
Sourcepub fn function_not_found(name: impl Into<String>) -> Self
pub fn function_not_found(name: impl Into<String>) -> Self
Function not found.
Sourcepub fn wrong_argument_count(
function: impl Into<String>,
expected_min: usize,
expected_max: Option<usize>,
actual: usize,
) -> Self
pub fn wrong_argument_count( function: impl Into<String>, expected_min: usize, expected_max: Option<usize>, actual: usize, ) -> Self
Wrong argument count.
Sourcepub fn type_mismatch(
expected: SqlType,
actual: SqlType,
context: impl Into<String>,
) -> Self
pub fn type_mismatch( expected: SqlType, actual: SqlType, context: impl Into<String>, ) -> Self
Type mismatch.
Sourcepub fn types_not_comparable(left: SqlType, right: SqlType) -> Self
pub fn types_not_comparable(left: SqlType, right: SqlType) -> Self
Types not comparable.
Sourcepub fn non_aggregated_column(column: impl Into<String>) -> Self
pub fn non_aggregated_column(column: impl Into<String>) -> Self
Non-aggregated column.
Sourcepub fn invalid_aggregate_use(
function: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn invalid_aggregate_use( function: impl Into<String>, reason: impl Into<String>, ) -> Self
Invalid aggregate use.
Sourcepub fn set_operation_column_mismatch(left: usize, right: usize) -> Self
pub fn set_operation_column_mismatch(left: usize, right: usize) -> Self
Set operation column mismatch.
Trait Implementations§
Source§impl Clone for AnalyzerError
impl Clone for AnalyzerError
Source§fn clone(&self) -> AnalyzerError
fn clone(&self) -> AnalyzerError
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 AnalyzerError
impl Debug for AnalyzerError
Source§impl Display for AnalyzerError
impl Display for AnalyzerError
Source§impl Error for AnalyzerError
impl Error for AnalyzerError
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 AnalyzerError
impl RefUnwindSafe for AnalyzerError
impl Send for AnalyzerError
impl Sync for AnalyzerError
impl Unpin for AnalyzerError
impl UnwindSafe for AnalyzerError
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