pub trait TimeoutError: Sized {
// Required method
fn from_timeout(kind: BackendKind, d: Duration) -> Self;
}Expand description
可被超时包装的错误类型。
六个非 RDBMS trait(Cache / SearchClient / GraphClient /
DocumentClient / StorageClient / TsdbClient)共用 ecat_errors::Error,
RDBMS 路径用 RdbmsError —— 两个实现就够,不需要六套。
Required Methods§
Sourcefn from_timeout(kind: BackendKind, d: Duration) -> Self
fn from_timeout(kind: BackendKind, d: Duration) -> Self
kind 只被 Error 那个实现用来填 reason(BackendKind::slug);
RdbmsError::Timeout 没有 reason 字段,忽略它。
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".