Trait IntoExitError

Source
pub trait IntoExitError {
    type Ret;

    // Required methods
    fn into_exit_error(
        self,
        stdout: impl Into<String>,
        stderr: impl Into<String>,
    ) -> Self::Ret;
    fn into_exit_error_with<__F, __STDOUT, __STDERR>(self, f: __F) -> Self::Ret
       where __F: FnOnce() -> (__STDOUT, __STDERR),
             __STDOUT: Into<String>,
             __STDERR: Into<String>;
}
Expand description

Extension trait for converting std::process::ExitStatusError into JeprofError::ExitError with the given context.

Required Associated Types§

Required Methods§

Source

fn into_exit_error( self, stdout: impl Into<String>, stderr: impl Into<String>, ) -> Self::Ret

Converts std::process::ExitStatusError into JeprofError::ExitError with the given context.

Source

fn into_exit_error_with<__F, __STDOUT, __STDERR>(self, f: __F) -> Self::Ret
where __F: FnOnce() -> (__STDOUT, __STDERR), __STDOUT: Into<String>, __STDERR: Into<String>,

Converts std::process::ExitStatusError into JeprofError::ExitError with the context returned by the given function.

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 IntoExitError for ExitStatusError

Source§

fn into_exit_error( self, stdout: impl Into<String>, stderr: impl Into<String>, ) -> Self::Ret

Converts std::process::ExitStatusError into JeprofError::ExitError with the given context.

Source§

fn into_exit_error_with<__F, __STDOUT, __STDERR>(self, f: __F) -> Self::Ret
where __F: FnOnce() -> (__STDOUT, __STDERR), __STDOUT: Into<String>, __STDERR: Into<String>,

Converts std::process::ExitStatusError into JeprofError::ExitError with the context returned by the given function.

Source§

type Ret = JeprofError

Source§

impl<__T> IntoExitError for Result<__T, ExitStatusError>

Source§

fn into_exit_error( self, stdout: impl Into<String>, stderr: impl Into<String>, ) -> Self::Ret

Converts std::process::ExitStatusError into JeprofError::ExitError with the given context.

Source§

fn into_exit_error_with<__F, __STDOUT, __STDERR>(self, f: __F) -> Self::Ret
where __F: FnOnce() -> (__STDOUT, __STDERR), __STDOUT: Into<String>, __STDERR: Into<String>,

Converts std::process::ExitStatusError into JeprofError::ExitError with the context returned by the given function.

Source§

type Ret = Result<__T, JeprofError>

Implementors§