pub trait PipeTarget: Send + Sync {
// Required method
fn pipe(&self, input: &str) -> Result<String, PipeError>;
}Expand description
A target that can receive piped output
Required Methods§
Sourcefn pipe(&self, input: &str) -> Result<String, PipeError>
fn pipe(&self, input: &str) -> Result<String, PipeError>
Pipe the input to the target and return the resulting output.
If the target is configured to ‘capture’, the returned string is the command’s stdout. If the target is ‘passthrough’, the returned string is the original input. If the target is ‘consume’, the returned string is empty (or filtered out by caller).