pub struct ScopedPipefail(/* private fields */);Expand description
Overrides the pipefail mode in the current thread, while the value is in scope.
Each override restores the previous value when dropped, so they can be nested. Since overrides are thread-local, these values can’t be sent across threads.
// Must give the variable a name, not just `_`
let _debug = ScopedPipefail::set(false);
run_cmd!(false | true)?; // Will have pipefail offImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScopedPipefail
impl RefUnwindSafe for ScopedPipefail
impl !Send for ScopedPipefail
impl !Sync for ScopedPipefail
impl Unpin for ScopedPipefail
impl UnwindSafe for ScopedPipefail
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