pub struct CommandHandle {
pub pid: i64,
pub id: String,
/* private fields */
}Expand description
A background command.
Fields§
§pid: i64The pid of the command’s process group leader in the sandbox.
id: StringNames the command’s state directory.
Implementations§
Source§impl CommandHandle
impl CommandHandle
Sourcepub fn exit_code(&self) -> Option<i32>
pub fn exit_code(&self) -> Option<i32>
The exit code once known (after wait or a poll that saw the exit).
Sourcepub async fn poll(&self) -> Result<Option<i32>>
pub async fn poll(&self) -> Result<Option<i32>>
Fetches new output and returns the exit code, or None while the command runs.
Sourcepub async fn wait(&self) -> Result<CommandResult>
pub async fn wait(&self) -> Result<CommandResult>
Waits for the command to exit. A non-zero exit is Error::CommandExit with the result.
Sourcepub async fn wait_with(&self, o: WaitOptions) -> Result<CommandResult>
pub async fn wait_with(&self, o: WaitOptions) -> Result<CommandResult>
wait, delivering output to callbacks as it arrives.
Trait Implementations§
Source§impl Clone for CommandHandle
impl Clone for CommandHandle
Source§fn clone(&self) -> CommandHandle
fn clone(&self) -> CommandHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CommandHandle
impl !RefUnwindSafe for CommandHandle
impl Send for CommandHandle
impl Sync for CommandHandle
impl Unpin for CommandHandle
impl UnsafeUnpin for CommandHandle
impl !UnwindSafe for CommandHandle
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].