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
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)
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)>
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 Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe 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
Mutably borrows from an owned value. Read more
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>
Wrap the input message
T in a tonic::Request