pub struct RunError<S: CmdString> { /* private fields */ }
Expand description
Error running a command.
Implementations§
source§impl<S: CmdString> RunError<S>
impl<S: CmdString> RunError<S>
sourcepub fn new(cmd: Cmd<S>, kind: RunErrorKind) -> Self
pub fn new(cmd: Cmd<S>, kind: RunErrorKind) -> Self
Creates a new RunError
.
sourcepub fn catch<F, U>(cmd: &Cmd<S>, func: F) -> RunResult<U, S>
pub fn catch<F, U>(cmd: &Cmd<S>, func: F) -> RunResult<U, S>
Transforms a RunErrorKind
of a closure to RunError
.
sourcepub async fn catch_async<F, U, Fut>(cmd: &Cmd<S>, func: F) -> RunResult<U, S>
Available on crate feature async
only.
pub async fn catch_async<F, U, Fut>(cmd: &Cmd<S>, func: F) -> RunResult<U, S>
async
only.Transforms a RunErrorKind
of a closure to RunError
.
Trait Implementations§
source§impl<S: CmdString> Error for RunError<S>
impl<S: CmdString> Error for RunError<S>
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<S> !RefUnwindSafe for RunError<S>
impl<S> Send for RunError<S>
impl<S> Sync for RunError<S>
impl<S> Unpin for RunError<S>
impl<S> !UnwindSafe for RunError<S>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more