pub struct ScytheError {
pub code: ErrorCode,
pub message: String,
}Fields§
§code: ErrorCode§message: StringImplementations§
Source§impl ScytheError
impl ScytheError
pub fn new(code: ErrorCode, message: impl Into<String>) -> Self
pub fn syntax(msg: impl Into<String>) -> Self
pub fn unknown_table(name: &str) -> Self
pub fn unknown_column(name: &str) -> Self
pub fn unknown_function(name: &str) -> Self
pub fn ambiguous_column(name: &str) -> Self
pub fn type_mismatch(msg: impl Into<String>) -> Self
pub fn missing_annotation(what: &str) -> Self
pub fn invalid_annotation(msg: impl Into<String>) -> Self
pub fn column_count_mismatch(left: usize, right: usize) -> Self
pub fn duplicate_alias(name: &str) -> Self
Sourcepub fn cte_column_alias_mismatch(
alias_count: usize,
column_count: usize,
) -> Self
pub fn cte_column_alias_mismatch( alias_count: usize, column_count: usize, ) -> Self
The explicit column alias list on a CTE (WITH t(a, b) AS ...) has a
different entry count than the CTE body’s output columns. PostgreSQL
rejects this at parse/plan time, so scythe must too — silently matching
by position would mislabel columns.
pub fn invalid_recursion(msg: impl Into<String>) -> Self
Sourcepub fn invalid_config(msg: impl Into<String>) -> Self
pub fn invalid_config(msg: impl Into<String>) -> Self
Build an error for user-supplied configuration that scythe understood well enough to reject — a misspelled option key, an out-of-range value.
Prefer this over ScytheError::new with ErrorCode::InternalError
anywhere the offending input came from scythe.toml rather than from
scythe’s own state.
Trait Implementations§
Source§impl Debug for ScytheError
impl Debug for ScytheError
Source§impl Display for ScytheError
impl Display for ScytheError
Source§impl Error for ScytheError
impl Error for ScytheError
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 ScytheError
impl RefUnwindSafe for ScytheError
impl Send for ScytheError
impl Sync for ScytheError
impl Unpin for ScytheError
impl UnsafeUnpin for ScytheError
impl UnwindSafe for ScytheError
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