pub struct RunError { /* private fields */ }
Expand description
Error running a command.
Implementations§
source§impl RunError
impl RunError
sourcepub fn new(cmd: Cmd, kind: RunErrorKind) -> Self
pub fn new(cmd: Cmd, kind: RunErrorKind) -> Self
Creates a new RunError
.
sourcepub fn catch<F, U>(cmd: &Cmd, func: F) -> RunResult<U>where
F: FnOnce() -> Result<U, RunErrorKind>,
pub fn catch<F, U>(cmd: &Cmd, func: F) -> RunResult<U>where F: FnOnce() -> Result<U, RunErrorKind>,
Transforms a RunErrorKind
of a closure to RunError
.
sourcepub async fn catch_async<F, U, Fut>(cmd: &Cmd, func: F) -> RunResult<U>where
Fut: Future<Output = Result<U, RunErrorKind>>,
F: FnOnce() -> Fut,
Available on crate feature async
only.
pub async fn catch_async<F, U, Fut>(cmd: &Cmd, func: F) -> RunResult<U>where Fut: Future<Output = Result<U, RunErrorKind>>, F: FnOnce() -> Fut,
async
only.Transforms a RunErrorKind
of a closure to RunError
.
Trait Implementations§
source§impl Error for RunError
impl Error for RunError
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 !RefUnwindSafe for RunError
impl Send for RunError
impl Sync for RunError
impl Unpin for RunError
impl !UnwindSafe for RunError
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