Skip to main content

DsErrorKind

Enum DsErrorKind 

Source
pub enum DsErrorKind {
Show 28 variants InputOutput { path: Option<PathBuf>, kind: String, errno: Option<i32>, }, Storage { op: String, details: String, }, PageNotFound { id: u64, }, PageFull, PageSizeMismatch { expected: usize, actual: usize, }, ChecksumMismatch { id: u64, }, InvalidPageType { page_type: u8, }, Corrupted { reason: String, }, Serialization { format: String, details: String, }, Parse { target: String, details: String, }, Type { expected: String, actual: String, }, TypeConversion { from: String, to: String, }, Query { sql: String, details: String, }, Execution { op: String, details: String, }, Schema { table: Option<String>, column: Option<String>, details: String, }, TableNotFound { name: String, }, Consensus { op: String, details: String, }, Network { addr: Option<String>, details: String, }, Protocol { details: String, }, Internal { details: String, }, Config { key: String, details: String, }, Http { code: u16, url: String, method: String, }, Join { details: String, }, Cache { op: String, details: String, }, Sync { details: String, }, Permission { action: String, resource: String, }, Tenant { id: String, details: String, }, Quota { resource: String, limit: u64, usage: u64, },
}
Expand description

Detailed error categories.

Variants§

§

InputOutput

Fields

§kind: String
§errno: Option<i32>
§

Storage

Fields

§details: String
§

PageNotFound

Fields

§id: u64
§

PageFull

§

PageSizeMismatch

Fields

§expected: usize
§actual: usize
§

ChecksumMismatch

Fields

§id: u64
§

InvalidPageType

Fields

§page_type: u8
§

Corrupted

Fields

§reason: String
§

Serialization

Fields

§format: String
§details: String
§

Parse

Fields

§target: String
§details: String
§

Type

Fields

§expected: String
§actual: String
§

TypeConversion

Fields

§from: String
§

Query

Fields

§details: String
§

Execution

Fields

§details: String
§

Schema

Fields

§column: Option<String>
§details: String
§

TableNotFound

Fields

§name: String
§

Consensus

Fields

§details: String
§

Network

Fields

§details: String
§

Protocol

Fields

§details: String
§

Internal

Fields

§details: String
§

Config

Fields

§details: String
§

Http

Fields

§code: u16
§method: String
§

Join

Fields

§details: String
§

Cache

Fields

§details: String
§

Sync

Fields

§details: String
§

Permission

Fields

§action: String
§resource: String
§

Tenant

Fields

§details: String
§

Quota

Fields

§resource: String
§limit: u64
§usage: u64

Implementations§

Source§

impl DsErrorKind

Source

pub fn key(&self) -> &'static str

Gets the i18n key for this error kind.

Trait Implementations§

Source§

impl Clone for DsErrorKind

Source§

fn clone(&self) -> DsErrorKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DsErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DsErrorKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for DsErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<DsErrorKind> for DsError

Source§

fn from(kind: DsErrorKind) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for DsErrorKind

Source§

fn eq(&self, other: &DsErrorKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for DsErrorKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for DsErrorKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,