Skip to main content

ApiResultExt

Trait ApiResultExt 

Source
pub trait ApiResultExt<T, S> {
    // Required method
    fn into_superset<U>(self) -> Result<T, ApiResponse<U>>
       where U: Superset<S>;
}
Expand description

Extension trait for Result types with ApiResponse errors, providing a method to convert the error type into a superset error type.

Required Methods§

Source

fn into_superset<U>(self) -> Result<T, ApiResponse<U>>
where U: Superset<S>,

Converts the error type of the Result into a superset error type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, S> ApiResultExt<T, S> for Result<T, ApiResponse<S>>

Source§

fn into_superset<U>(self) -> Result<T, ApiResponse<U>>
where U: Superset<S>,

Implementors§