Trait CreateError

Source
pub trait CreateError<E> {
    // Required method
    fn create_error(error_msg: E) -> Self;
}
Expand description

Trait to create errors that match the async function’s return type

This trait is used internally by the pipeline macro to create error values that have the same type as the function’s return type.

Required Methods§

Source

fn create_error(error_msg: E) -> Self

Create an error value from the given 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§

Source§

impl<T, E> CreateError<E> for Result<T, E>

Source§

fn create_error(error_msg: E) -> Self

Implementors§

Source§

impl<T, E> CreateError<E> for PipexResult<T, E>