ydb_unofficial/sqlx/
error.rs1use sqlx_core::error::DatabaseError;
2use std::error::Error as StdError;
3use crate::error::YdbError;
4use sqlx_core::error::ErrorKind as XErrorKind;
5
6impl DatabaseError for YdbError {
7 fn message(&self) -> &str {
8 #[allow(deprecated)]
9 self.description()
10 }
11
12 fn as_error(&self) -> &(dyn StdError + Send + Sync + 'static) {
13 self
14 }
15
16 fn as_error_mut(&mut self) -> &mut (dyn StdError + Send + Sync + 'static) {
17 self
18 }
19
20 fn into_error(self: Box<Self>) -> Box<dyn StdError + Send + Sync + 'static> {
21 self
22 }
23
24 fn kind(&self) -> XErrorKind {
25 XErrorKind::Other
26 }
27}