pub struct DecodeError {
pub column: Cow<'static, str>,
pub expected: &'static str,
pub actual: Cow<'static, str>,
/* private fields */
}Expand description
Row/column decoding failure.
Fields§
§column: Cow<'static, str>§expected: &'static str§actual: Cow<'static, str>Implementations§
Source§impl DecodeError
impl DecodeError
Sourcepub fn with_source(
column: impl Into<Cow<'static, str>>,
expected: &'static str,
actual: impl Into<Cow<'static, str>>,
source: impl Error + Send + Sync + 'static,
) -> BsqlError
pub fn with_source( column: impl Into<Cow<'static, str>>, expected: &'static str, actual: impl Into<Cow<'static, str>>, source: impl Error + Send + Sync + 'static, ) -> BsqlError
Create a decode error with an underlying cause.
Sourcepub fn column_count(expected: usize, actual: usize) -> BsqlError
pub fn column_count(expected: usize, actual: usize) -> BsqlError
Create a decode error for a column count mismatch.
Used by generated code to detect schema drift between compile-time and runtime (e.g. a column was added/removed after the binary was built).
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
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 DecodeError
impl !RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnsafeUnpin for DecodeError
impl !UnwindSafe for DecodeError
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