pub enum ToqlError {
Show 16 variants
NotFound,
NotUnique,
JoinExpected,
QueryParserError(PestError<Rule>),
SqlExprParserError(PestError<Rule>),
RoleExprParserError(PestError<Rule>),
EncodingError(Utf8Error),
MapperMissing(String),
TryFromSqlArgError(TryFromSqlArgError),
TableMapperError(TableMapperError),
ValueMissing(String),
SqlBuilderError(SqlBuilderError),
DeserializeError(DeserializeError),
SqlExprResolverError(ResolverError),
RegistryPoisenError(String),
NoneError(String),
}
Expand description
Represents all errors
Variants
NotFound
No single record found for the Toql query.
NotUnique
Many records found, when exactly one was expected.
JoinExpected
Joined entity is missing, when exactly one was expected.
QueryParserError(PestError<Rule>)
The query parser encountered a syntax error.
SqlExprParserError(PestError<Rule>)
The sql expression parser encountered a syntax error.
RoleExprParserError(PestError<Rule>)
The role expression parser encountered a syntax error.
EncodingError(Utf8Error)
The query encoding was not valid UTF-8.
MapperMissing(String)
No mapper was found for a given struct. Contains the struct name.
TryFromSqlArgError(TryFromSqlArgError)
No mapper was found for a given struct. Contains the struct name.
TableMapperError(TableMapperError)
The Mapper encountered an error
ValueMissing(String)
Unable to put database result into struct. Contains field name.
SqlBuilderError(SqlBuilderError)
SQL Builder failed to turn Toql query into SQL query.
DeserializeError(DeserializeError)
Toql failed to convert row value into struct field
SqlExprResolverError(ResolverError)
SQL Builder failed to turn Toql query into SQL query.
RegistryPoisenError(String)
Access to shared registry, typically inside cache, failed
NoneError(String)
Expected a value in Option
Trait Implementations
sourceimpl Error for ToqlError
impl Error for ToqlError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<DeserializeError> for ToqlError
impl From<DeserializeError> for ToqlError
sourcefn from(source: DeserializeError) -> Self
fn from(source: DeserializeError) -> Self
Converts to this type from the input type.
sourceimpl<PE> From<PoisonError<PE>> for ToqlError
impl<PE> From<PoisonError<PE>> for ToqlError
sourcefn from(err: PoisonError<PE>) -> ToqlError
fn from(err: PoisonError<PE>) -> ToqlError
Converts to this type from the input type.
sourceimpl From<ResolverError> for ToqlError
impl From<ResolverError> for ToqlError
sourcefn from(source: ResolverError) -> Self
fn from(source: ResolverError) -> Self
Converts to this type from the input type.
sourceimpl From<SqlBuilderError> for ToqlError
impl From<SqlBuilderError> for ToqlError
sourcefn from(source: SqlBuilderError) -> Self
fn from(source: SqlBuilderError) -> Self
Converts to this type from the input type.
sourceimpl From<TableMapperError> for ToqlError
impl From<TableMapperError> for ToqlError
sourcefn from(source: TableMapperError) -> Self
fn from(source: TableMapperError) -> Self
Converts to this type from the input type.
sourceimpl From<TryFromSqlArgError> for ToqlError
impl From<TryFromSqlArgError> for ToqlError
sourcefn from(source: TryFromSqlArgError) -> Self
fn from(source: TryFromSqlArgError) -> Self
Converts to this type from the input type.
sourceimpl FromRow<Row, ToqlError> for String
impl FromRow<Row, ToqlError> for String
sourcefn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
fn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
Returns the number of selects This is needed to advance the iterator and the row index. The Deserializer needs this information to skip left joins that have fields selected but are null. Those left joins cause select information in the select stream that must be skipped. Read more
sourcefn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<String>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
fn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<String>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
Read row values into struct, starting from index. Advances iter and index Returns None for value unselected values or joined entities that have null keys. Return Error, if value is selected, but cannot be converted. Read more
sourceimpl FromRow<Row, ToqlError> for u8
impl FromRow<Row, ToqlError> for u8
sourcefn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
fn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
Returns the number of selects This is needed to advance the iterator and the row index. The Deserializer needs this information to skip left joins that have fields selected but are null. Those left joins cause select information in the select stream that must be skipped. Read more
sourcefn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<u8>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
fn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<u8>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
Read row values into struct, starting from index. Advances iter and index Returns None for value unselected values or joined entities that have null keys. Return Error, if value is selected, but cannot be converted. Read more
sourceimpl FromRow<Row, ToqlError> for bool
impl FromRow<Row, ToqlError> for bool
sourcefn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
fn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
Returns the number of selects This is needed to advance the iterator and the row index. The Deserializer needs this information to skip left joins that have fields selected but are null. Those left joins cause select information in the select stream that must be skipped. Read more
sourcefn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<bool>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
fn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<bool>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
Read row values into struct, starting from index. Advances iter and index Returns None for value unselected values or joined entities that have null keys. Return Error, if value is selected, but cannot be converted. Read more
sourceimpl FromRow<Row, ToqlError> for u16
impl FromRow<Row, ToqlError> for u16
sourcefn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
fn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
Returns the number of selects This is needed to advance the iterator and the row index. The Deserializer needs this information to skip left joins that have fields selected but are null. Those left joins cause select information in the select stream that must be skipped. Read more
sourcefn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<u16>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
fn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<u16>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
Read row values into struct, starting from index. Advances iter and index Returns None for value unselected values or joined entities that have null keys. Return Error, if value is selected, but cannot be converted. Read more
sourceimpl FromRow<Row, ToqlError> for u32
impl FromRow<Row, ToqlError> for u32
sourcefn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
fn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
Returns the number of selects This is needed to advance the iterator and the row index. The Deserializer needs this information to skip left joins that have fields selected but are null. Those left joins cause select information in the select stream that must be skipped. Read more
sourcefn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<u32>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
fn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<u32>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
Read row values into struct, starting from index. Advances iter and index Returns None for value unselected values or joined entities that have null keys. Return Error, if value is selected, but cannot be converted. Read more
sourceimpl FromRow<Row, ToqlError> for u64
impl FromRow<Row, ToqlError> for u64
sourcefn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
fn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
Returns the number of selects This is needed to advance the iterator and the row index. The Deserializer needs this information to skip left joins that have fields selected but are null. Those left joins cause select information in the select stream that must be skipped. Read more
sourcefn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<u64>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
fn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<u64>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
Read row values into struct, starting from index. Advances iter and index Returns None for value unselected values or joined entities that have null keys. Return Error, if value is selected, but cannot be converted. Read more
sourceimpl FromRow<Row, ToqlError> for i8
impl FromRow<Row, ToqlError> for i8
sourcefn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
fn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
Returns the number of selects This is needed to advance the iterator and the row index. The Deserializer needs this information to skip left joins that have fields selected but are null. Those left joins cause select information in the select stream that must be skipped. Read more
sourcefn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<i8>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
fn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<i8>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
Read row values into struct, starting from index. Advances iter and index Returns None for value unselected values or joined entities that have null keys. Return Error, if value is selected, but cannot be converted. Read more
sourceimpl FromRow<Row, ToqlError> for i16
impl FromRow<Row, ToqlError> for i16
sourcefn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
fn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
Returns the number of selects This is needed to advance the iterator and the row index. The Deserializer needs this information to skip left joins that have fields selected but are null. Those left joins cause select information in the select stream that must be skipped. Read more
sourcefn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<i16>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
fn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<i16>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
Read row values into struct, starting from index. Advances iter and index Returns None for value unselected values or joined entities that have null keys. Return Error, if value is selected, but cannot be converted. Read more
sourceimpl FromRow<Row, ToqlError> for i32
impl FromRow<Row, ToqlError> for i32
sourcefn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
fn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
Returns the number of selects This is needed to advance the iterator and the row index. The Deserializer needs this information to skip left joins that have fields selected but are null. Those left joins cause select information in the select stream that must be skipped. Read more
sourcefn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<i32>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
fn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<i32>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
Read row values into struct, starting from index. Advances iter and index Returns None for value unselected values or joined entities that have null keys. Return Error, if value is selected, but cannot be converted. Read more
sourceimpl FromRow<Row, ToqlError> for i64
impl FromRow<Row, ToqlError> for i64
sourcefn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
fn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
Returns the number of selects This is needed to advance the iterator and the row index. The Deserializer needs this information to skip left joins that have fields selected but are null. Those left joins cause select information in the select stream that must be skipped. Read more
sourcefn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<i64>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
fn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<i64>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
Read row values into struct, starting from index. Advances iter and index Returns None for value unselected values or joined entities that have null keys. Return Error, if value is selected, but cannot be converted. Read more
sourceimpl FromRow<Row, ToqlError> for f64
impl FromRow<Row, ToqlError> for f64
sourcefn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
fn forward<'a, I>(iter: &mut I) -> Result<usize, ToqlError> where
I: Iterator<Item = &'a Select>,
Returns the number of selects This is needed to advance the iterator and the row index. The Deserializer needs this information to skip left joins that have fields selected but are null. Those left joins cause select information in the select stream that must be skipped. Read more
sourcefn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<f64>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
fn from_row<'a, I>(
row: &Row,
i: &mut usize,
iter: &mut I
) -> Result<Option<f64>, ToqlError> where
I: Iterator<Item = &'a Select> + Clone,
Read row values into struct, starting from index. Advances iter and index Returns None for value unselected values or joined entities that have null keys. Return Error, if value is selected, but cannot be converted. Read more
Auto Trait Implementations
impl RefUnwindSafe for ToqlError
impl Send for ToqlError
impl Sync for ToqlError
impl Unpin for ToqlError
impl UnwindSafe for ToqlError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more