pub enum SurqlError {
Show 20 variants
Database {
reason: String,
},
Connection {
reason: String,
},
Query {
reason: String,
},
Transaction {
reason: String,
},
Context {
reason: String,
},
Registry {
reason: String,
},
Streaming {
reason: String,
},
Validation {
reason: String,
},
SchemaParse {
reason: String,
},
MigrationDiscovery {
reason: String,
},
MigrationLoad {
reason: String,
},
MigrationGeneration {
reason: String,
},
MigrationExecution {
reason: String,
},
MigrationHistory {
reason: String,
},
MigrationSquash {
reason: String,
},
MigrationWatcher {
reason: String,
},
Orchestration {
reason: String,
},
Serialization {
reason: String,
},
Io {
reason: String,
},
WithContext {
source: Box<SurqlError>,
context: String,
},
}Expand description
Unified error type for the surql crate.
Each variant corresponds to one subsystem. Variants can be wrapped with
additional context via Context::context.
Variants§
Database
General database error (analogue of Python DatabaseError).
Connection
Connection failed, timed out, or was closed unexpectedly.
Query
A query failed at the database or during result decoding.
Transaction
A transaction could not be started, committed, or rolled back.
Context
Ambient connection context was missing or misconfigured.
Registry
Named-connection registry lookup or registration failed.
Streaming
Live/streaming query error.
Validation
Input failed validation (invalid identifier, malformed id, etc.).
SchemaParse
Schema parser could not understand the schema text or response.
MigrationDiscovery
Error while discovering migration files on disk.
MigrationLoad
Error while loading an individual migration.
MigrationGeneration
Error while generating a migration from a schema diff.
MigrationExecution
Error while executing a migration against the database.
MigrationHistory
Error while reading or writing migration history.
MigrationSquash
Error while squashing migrations.
MigrationWatcher
Error raised by the schema file watcher.
Orchestration
Multi-environment orchestration failed.
Serialization
JSON encode or decode failure.
Io
Filesystem / generic I/O error.
WithContext
An existing SurqlError with extra context prepended.
Fields
source: Box<SurqlError>Underlying error.
Trait Implementations§
Source§impl Clone for SurqlError
impl Clone for SurqlError
Source§fn clone(&self) -> SurqlError
fn clone(&self) -> SurqlError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SurqlError
impl Debug for SurqlError
Source§impl Display for SurqlError
impl Display for SurqlError
Source§impl Error for SurqlError
impl Error for SurqlError
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()
Source§impl From<Error> for SurqlError
impl From<Error> for SurqlError
Source§impl From<Error> for SurqlError
impl From<Error> for SurqlError
Source§impl From<Error> for SurqlError
impl From<Error> for SurqlError
Source§impl PartialEq for SurqlError
impl PartialEq for SurqlError
impl Eq for SurqlError
impl StructuralPartialEq for SurqlError
Auto Trait Implementations§
impl Freeze for SurqlError
impl RefUnwindSafe for SurqlError
impl Send for SurqlError
impl Sync for SurqlError
impl Unpin for SurqlError
impl UnsafeUnpin for SurqlError
impl UnwindSafe for SurqlError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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