pub enum Error {
Show 17 variants
Connection(String),
Query {
code: String,
message: String,
},
Auth(String),
Io(Error),
Json(Error),
Quic(String),
Tls(String),
InvalidDsn(String),
Type(String),
Timeout,
Pool(String),
Validation(String),
Limit(String),
InvalidIdent(String),
InvalidString(String),
NoRows,
Other(String),
}Expand description
Error types that can occur when using the Geode client
Variants§
Connection(String)
Connection error
Query
Query execution error
Auth(String)
Authentication error
Io(Error)
I/O error
Json(Error)
JSON serialization/deserialization error
Quic(String)
QUIC connection error
Tls(String)
TLS error
InvalidDsn(String)
Invalid DSN format
Type(String)
Type conversion error
Timeout
Timeout error
Pool(String)
Pool error
Validation(String)
Input validation error
Limit(String)
Client-side limit exceeded (frame size, rows, depth, etc.)
InvalidIdent(String)
Invalid identifier (contains forbidden characters)
InvalidString(String)
Invalid string literal (contains forbidden characters)
NoRows
No rows returned by a query expected to return at least one row.
Other(String)
Generic error
Implementations§
Source§impl Error
impl Error
Sourcepub fn connection<S: Into<String>>(msg: S) -> Self
pub fn connection<S: Into<String>>(msg: S) -> Self
Create a connection error
Sourcepub fn transaction<S: Into<String>>(msg: S) -> Self
pub fn transaction<S: Into<String>>(msg: S) -> Self
Create a transaction error
Sourcepub fn type_error<S: Into<String>>(msg: S) -> Self
pub fn type_error<S: Into<String>>(msg: S) -> Self
Create a type error
Sourcepub fn validation<S: Into<String>>(msg: S) -> Self
pub fn validation<S: Into<String>>(msg: S) -> Self
Create a validation error
Sourcepub fn invalid_dsn<S: Into<String>>(msg: S) -> Self
pub fn invalid_dsn<S: Into<String>>(msg: S) -> Self
Create an invalid DSN error
Sourcepub fn invalid_ident<S: Into<String>>(msg: S) -> Self
pub fn invalid_ident<S: Into<String>>(msg: S) -> Self
Create an invalid identifier error
Sourcepub fn invalid_string<S: Into<String>>(msg: S) -> Self
pub fn invalid_string<S: Into<String>>(msg: S) -> Self
Create an invalid string literal error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if the error is retryable
Retryable errors are transient failures that may succeed on retry:
- Connection errors (network issues)
- Timeout errors
- QUIC errors (connection reset, etc.)
- Query errors with serialization failure codes (40001, 40P01)
Sourcepub fn is_auth_error(&self) -> bool
pub fn is_auth_error(&self) -> bool
Returns true if this error represents an authentication/authorization
failure (status class 28000 or the Geode-specific 08P01), or an
Error::Auth variant.
Sourcepub fn is_syntax_error(&self) -> bool
pub fn is_syntax_error(&self) -> bool
Returns true if this error represents a syntax error (status class 42000).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request