pub enum SerializationError {
    Serde(String),
    Parse {
        value: String,
        db_type: &'static str,
        cause: Option<Box<dyn Error + Send + Sync + 'static>>,
    },
    StructuralMismatch(&'static str),
    Type {
        value_type: &'static str,
        db_type: &'static str,
    },
    Range(&'static str, &'static str),
}
Expand description

Error that can occur while serializing a standard rust type or struct into a SQL parameter.

Variants§

§

Serde(String)

General Error, used by the serde framework.

§

Parse

Fields

§value: String

value

§db_type: &'static str

Target SQL type

§cause: Option<Box<dyn Error + Send + Sync + 'static>>

Cause

Parsing the target SQL parameter from the given String representation failed

§

StructuralMismatch(&'static str)

The structure of the provided type does not fit to the required list of parameters

§

Type

Fields

§value_type: &'static str

Type of the value that is being serialized

§db_type: &'static str

Type of the target db parameter

The input type does not fit to the required database type.

§

Range(&'static str, &'static str)

The input value is too big or too small for the required database type.

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
The lower-level source of this error, if any. Read more
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Used when a Serialize implementation encounters any error while serializing a type. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.