pub enum Error {
}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.)
NoRows
No rows returned by a query expected to return at least one row.
Mirrors the Go reference client’s ErrNoRows sentinel.
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 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
Reports whether this is a Geode authentication or authorization failure.
Returns true for query errors carrying the ISO/IEC 39075 status
class 28000 (authorization error) or the Geode-specific 08P01
(password reset required) extension. Mirrors the Go reference
client’s IsAuthError.
Sourcepub fn is_syntax_error(&self) -> bool
pub fn is_syntax_error(&self) -> bool
Reports whether this is a GQL parse or syntax error (status class
42000).
The Geode engine returns 42000 for unrecognised statements,
including admin DDL verbs not yet implemented in the connected
server build, so handlers can use this to degrade gracefully.
Mirrors the Go reference client’s IsSyntaxError.
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