pub struct NativeProcess { /* private fields */ }Implementations§
Source§impl NativeProcess
impl NativeProcess
pub fn new(config: ProcessConfig) -> Self
pub fn start(&self) -> Result<(), ProcessError>
pub fn write_stdin(&self, data: &[u8]) -> Result<(), ProcessError>
pub fn poll(&self) -> Result<Option<i32>, ProcessError>
pub fn wait(&self, timeout: Option<Duration>) -> Result<i32, ProcessError>
pub fn kill(&self) -> Result<(), ProcessError>
pub fn terminate(&self) -> Result<(), ProcessError>
pub fn close(&self) -> Result<(), ProcessError>
pub fn pid(&self) -> Option<u32>
pub fn returncode(&self) -> Option<i32>
pub fn has_pending_stream(&self, stream: StreamKind) -> bool
pub fn has_pending_combined(&self) -> bool
pub fn drain_stream(&self, stream: StreamKind) -> Vec<Vec<u8>>
pub fn drain_combined(&self) -> Vec<StreamEvent>
pub fn read_stream( &self, stream: StreamKind, timeout: Option<Duration>, ) -> ReadStatus<Vec<u8>>
pub fn read_combined( &self, timeout: Option<Duration>, ) -> ReadStatus<StreamEvent>
pub fn captured_stdout(&self) -> Vec<Vec<u8>>
pub fn captured_stderr(&self) -> Vec<Vec<u8>>
pub fn captured_combined(&self) -> Vec<StreamEvent>
pub fn captured_stream_bytes(&self, stream: StreamKind) -> usize
pub fn captured_combined_bytes(&self) -> usize
pub fn clear_captured_stream(&self, stream: StreamKind) -> usize
pub fn clear_captured_combined(&self) -> usize
Auto Trait Implementations§
impl Freeze for NativeProcess
impl RefUnwindSafe for NativeProcess
impl Send for NativeProcess
impl Sync for NativeProcess
impl Unpin for NativeProcess
impl UnsafeUnpin for NativeProcess
impl UnwindSafe for NativeProcess
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more