pub struct ProcessRunnerContext { /* private fields */ }Expand description
Context passed to a process runner.
Implementations§
Source§impl ProcessRunnerContext
impl ProcessRunnerContext
Sourcepub fn new(cancellation_token: CancellationToken) -> Self
pub fn new(cancellation_token: CancellationToken) -> Self
Creates a process runner context with the provided cancellation token.
Sourcepub fn with_output_sink(self, sink: ProcessOutputSink) -> Self
pub fn with_output_sink(self, sink: ProcessOutputSink) -> Self
Attaches a non-blocking live output sink for streaming stdout/stderr progress.
Sourcepub fn cancellation_token(&self) -> &CancellationToken
pub fn cancellation_token(&self) -> &CancellationToken
Returns the cancellation token for this process action.
Sourcepub fn output_sink(&self) -> Option<&ProcessOutputSink>
pub fn output_sink(&self) -> Option<&ProcessOutputSink>
Returns the optional live output sink for streaming stdout/stderr progress.
Trait Implementations§
Source§impl Clone for ProcessRunnerContext
impl Clone for ProcessRunnerContext
Auto Trait Implementations§
impl Forget for ProcessRunnerContext
impl Freeze for ProcessRunnerContextwhere
*const ArcInner<TreeNode> is !null: Freeze,
PhantomData<ArcInner<TreeNode>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<Chan<ProcessOutputChunk, Semaphore>> is !null: Freeze,
PhantomData<ArcInner<Chan<ProcessOutputChunk, Semaphore>>>: Freeze,
impl Move for ProcessRunnerContext
impl RefUnwindSafe for ProcessRunnerContextwhere
CancellationToken: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
Chan<ProcessOutputChunk, Semaphore>: RefUnwindSafe,
impl Send for ProcessRunnerContext
impl Sync for ProcessRunnerContext
impl Unpin for ProcessRunnerContext
impl UnsafeUnpin for ProcessRunnerContextwhere
*const ArcInner<TreeNode> is !null: UnsafeUnpin,
PhantomData<ArcInner<TreeNode>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Chan<ProcessOutputChunk, Semaphore>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Chan<ProcessOutputChunk, Semaphore>>>: UnsafeUnpin,
impl UnwindSafe for ProcessRunnerContextwhere
CancellationToken: UnwindSafe,
RawVecInner: UnwindSafe,
Arc<Chan<ProcessOutputChunk, Semaphore>>: UnwindSafe,
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