Trait ToStringResultToRspackResultExt

Source
pub trait ToStringResultToRspackResultExt<T, E: ToString> {
    // Required methods
    fn to_rspack_result(self) -> Result<T>;
    fn to_rspack_result_with_message(
        self,
        formatter: impl FnOnce(E) -> String,
    ) -> Result<T>;
}

Required Methods§

Source

fn to_rspack_result(self) -> Result<T>

Source

fn to_rspack_result_with_message( self, formatter: impl FnOnce(E) -> String, ) -> Result<T>

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: ToString> ToStringResultToRspackResultExt<T, E> for Result<T, E>

Source§

fn to_rspack_result(self) -> Result<T>

Source§

fn to_rspack_result_with_message( self, formatter: impl FnOnce(E) -> String, ) -> Result<T>

Implementors§