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>(cmd: &Cmd<S>, future: F) -> RunResult<U, S>
Available on crate feature async only.
pub async fn catch_async<F, U>(cmd: &Cmd<S>, future: 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)>
Returns 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> Freeze for RunError<S>
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