Skip to main content

DecodeError

Trait DecodeError 

pub trait DecodeError {
    type Ok;

    // Required method
    fn decode_error(self, msg: impl Display) -> Result<Self::Ok, Error>;
}
Expand description

Result adapter for converting generic errors into [sqlx] errors.

Required Associated Types§

type Ok

Required Methods§

fn decode_error(self, msg: impl Display) -> Result<Self::Ok, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl<T, E> DecodeError for Result<T, E>
where E: Error + Send + Sync + 'static,

§

type Ok = T

§

fn decode_error( self, msg: impl Display, ) -> Result<<Result<T, E> as DecodeError>::Ok, Error>

Implementors§