Skip to main content

CommandFdInjectionExt

Trait CommandFdInjectionExt 

Source
pub trait CommandFdInjectionExt {
    // Required method
    fn inject_fds(
        &mut self,
        open_files: impl Iterator<Item = (ShellFd, OpenFile)>,
    ) -> Result<(), Error>;
}
Available on Unix only.
Expand description

Extension trait for injecting file descriptors into commands.

Required Methods§

Source

fn inject_fds( &mut self, open_files: impl Iterator<Item = (ShellFd, OpenFile)>, ) -> Result<(), Error>

Injects the given open files as file descriptors into the command.

§Arguments
  • open_files - A mapping of child file descriptors to open files.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CommandFdInjectionExt for Command

Source§

fn inject_fds( &mut self, open_files: impl Iterator<Item = (ShellFd, OpenFile)>, ) -> Result<(), Error>

Implementors§