#[non_exhaustive]pub enum DocError {
FileReadError(Error),
CommentError(CommentError),
SqlParserError(ParserError),
InvalidObjectName {
message: String,
line: u64,
column: u64,
},
TableNotFound {
name: String,
},
DuplicateTablesFound {
tables: Vec<TableDoc>,
},
}Expand description
Errors that can occur while discovering, parsing, or documenting SQL files.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
FileReadError(Error)
Wrapper for standard std::io::Error
CommentError(CommentError)
Wrapper for CommentError
SqlParserError(ParserError)
Wrapper for ParserError
InvalidObjectName
Indicates an invalid or unexpected object name in the sqlparser::ast::Statement
Fields
§
message: StringThe message to accompany the invalid sqlparser::ast::ObjectName
§
line: u64The line number for the invalid sqlparser::ast::ObjectName
§
column: u64The column number for the invalid sqlparser::ast::ObjectName
TableNotFound
Table not found when searching crate::SqlDoc
DuplicateTablesFound
Duplicate tables with same name were found when searching crate::SqlDoc
Trait Implementations§
Source§impl Error for DocError
impl Error for DocError
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()
Source§impl From<CommentError> for DocError
impl From<CommentError> for DocError
Source§fn from(e: CommentError) -> Self
fn from(e: CommentError) -> Self
Converts to this type from the input type.
Source§impl From<ParserError> for DocError
impl From<ParserError> for DocError
Source§fn from(e: ParserError) -> Self
fn from(e: ParserError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DocError
impl !RefUnwindSafe for DocError
impl Send for DocError
impl Sync for DocError
impl Unpin for DocError
impl !UnwindSafe for DocError
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