pub struct MismatchedTypeError {
pub rust_type: String,
pub rust_sql_type: String,
pub sql_type: String,
pub source: Option<Box<dyn Error + Send + Sync>>,
}Expand description
Error indicating that a Rust type is not compatible with a SQL type.
Fields§
§rust_type: StringThe name of the Rust type.
rust_sql_type: StringThe SQL type name that the Rust type would map to.
sql_type: StringThe actual SQL type from the database.
source: Option<Box<dyn Error + Send + Sync>>Optional source error that caused the mismatch.
Implementations§
Source§impl MismatchedTypeError
impl MismatchedTypeError
Sourcepub fn new<DB, T>(ty: &<DB as Database>::TypeInfo) -> MismatchedTypeError
pub fn new<DB, T>(ty: &<DB as Database>::TypeInfo) -> MismatchedTypeError
Create a new mismatched type error without a source.
Trait Implementations§
Source§impl Debug for MismatchedTypeError
impl Debug for MismatchedTypeError
Source§impl Display for MismatchedTypeError
impl Display for MismatchedTypeError
Source§impl Error for MismatchedTypeError
impl Error for MismatchedTypeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for MismatchedTypeError
impl !RefUnwindSafe for MismatchedTypeError
impl Send for MismatchedTypeError
impl Sync for MismatchedTypeError
impl Unpin for MismatchedTypeError
impl UnsafeUnpin for MismatchedTypeError
impl !UnwindSafe for MismatchedTypeError
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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 more