pub struct WrappedChild { /* private fields */ }Expand description
Wrapper around Box
This wraps the process-wrap ChildWrapper trait to work with our existing Arc<Mutex<>> storage pattern in BackgroundTerminal.
Implementations§
Source§impl WrappedChild
impl WrappedChild
Sourcepub fn new(inner: Box<dyn ChildWrapper>) -> Self
pub fn new(inner: Box<dyn ChildWrapper>) -> Self
Create a new wrapped child from a process-wrap ChildWrapper
Sourcepub fn inner_mut(&mut self) -> &mut dyn ChildWrapper
pub fn inner_mut(&mut self) -> &mut dyn ChildWrapper
Get mutable reference to inner ChildWrapper
Sourcepub async fn kill(&mut self) -> Result<()>
pub async fn kill(&mut self) -> Result<()>
Kill the process group and wait for exit
This will terminate the entire process group, not just the parent process.
Sourcepub fn start_kill(&mut self) -> Result<()>
pub fn start_kill(&mut self) -> Result<()>
Start killing without waiting for exit
This initiates the kill operation but returns immediately.
Sourcepub async fn wait(&mut self) -> Result<ExitStatus>
pub async fn wait(&mut self) -> Result<ExitStatus>
Wait for the process to exit
Sourcepub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
pub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
Try to wait without blocking
Returns Some(status) if the process has exited, None if still running.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WrappedChild
impl !RefUnwindSafe for WrappedChild
impl Send for WrappedChild
impl !Sync for WrappedChild
impl Unpin for WrappedChild
impl !UnwindSafe for WrappedChild
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
fn into_option(self) -> Option<T>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request