Skip to main content

ResultExt

Trait ResultExt 

Source
pub trait ResultExt<Val> {
    // Required method
    fn map_err_to_unhandleable(self) -> SingleBuildResult<Val>;
}

Required Methods§

Source

fn map_err_to_unhandleable(self) -> SingleBuildResult<Val>

This method is used to make converting outside errors to BuildDiagnostic easier. For example, handling errors like converting u64 to usize in a platform that usize is 32-bit is meaningless for rolldown. So we just convert them to BuildDiagnostic::unhandleable_error to provide better dx around errors.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<Val, Err_> ResultExt<Val> for Result<Val, Err_>
where Err_: StdError + Send + Sync + 'static,

Implementors§