pub enum ShellPipeWriter {
OsPipe(PipeWriter),
StdFile(File),
Stdout,
Stderr,
Null,
}Expand description
Writer side of a pipe.
Ensure that all of these are dropped when complete in order to prevent deadlocks where the reader hangs waiting for a read.
Variants§
Implementations§
Source§impl ShellPipeWriter
impl ShellPipeWriter
pub fn stdout() -> Self
pub fn stderr() -> Self
pub fn null() -> Self
pub fn from_std(std_file: File) -> Self
pub fn into_stdio(self) -> Stdio
pub fn write_all(&mut self, bytes: &[u8]) -> Result<()>
pub fn write_all_iter<'a>( &mut self, iter: impl Iterator<Item = &'a [u8]> + 'a, ) -> Result<()>
pub fn write_line(&mut self, line: &str) -> Result<()>
Trait Implementations§
Source§impl Clone for ShellPipeWriter
impl Clone for ShellPipeWriter
Auto Trait Implementations§
impl Freeze for ShellPipeWriter
impl RefUnwindSafe for ShellPipeWriter
impl Send for ShellPipeWriter
impl Sync for ShellPipeWriter
impl Unpin for ShellPipeWriter
impl UnwindSafe for ShellPipeWriter
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