pub enum StdinData {
Bytes(Vec<u8>),
Reader(Box<dyn Read + Send + Sync>),
}Expand description
Input data to feed to a child process’s stdin.
Construct via the From impls — accepts Vec<u8>, String, &str,
&[u8], or Box<dyn Read + Send + Sync + 'static>. Use
from_reader() for the streaming case.
§Retry semantics
Bytes: owned, reusable. If theCmdis configured to retry, each attempt re-feeds the same bytes.Reader: one-shot. The first attempt consumes the reader. If a retry is needed, no stdin is available and the second attempt will likely behave differently. Avoid.retry()with a streaming reader unless you understand this.
Variants§
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StdinData
impl !RefUnwindSafe for StdinData
impl Send for StdinData
impl Sync for StdinData
impl Unpin for StdinData
impl UnsafeUnpin for StdinData
impl !UnwindSafe for StdinData
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