RtoolT

Trait RtoolT 

Source
pub trait RtoolT<C, P: LineProcessorT<C>> {
    // Provided methods
    fn process_lines<R: Read, W: Write>(
        &self,
        line_processor: &P,
        input: BufReader<R>,
        output: &mut BufWriter<W>,
        context: &C,
    ) { ... }
    fn process_readable<R: Read, W: Write>(
        &self,
        line_processor: &P,
        input: BufReader<R>,
        output: &mut BufWriter<W>,
        context: &C,
    ) { ... }
    fn process_files<W: Write>(
        &self,
        line_processor: &P,
        files: &Vec<&str>,
        writable: W,
        context: &C,
    ) { ... }
    fn process<W: Write>(
        &self,
        line_processor: &P,
        files: &Vec<&str>,
        writable: &mut W,
        context: &C,
    ) { ... }
    fn process_to_stdout(
        &self,
        line_processor: &P,
        files: &Vec<&str>,
        context: &C,
    ) { ... }
}

Provided Methods§

Source

fn process_lines<R: Read, W: Write>( &self, line_processor: &P, input: BufReader<R>, output: &mut BufWriter<W>, context: &C, )

Generic line processor that delegates to concrete line processors

Source

fn process_readable<R: Read, W: Write>( &self, line_processor: &P, input: BufReader<R>, output: &mut BufWriter<W>, context: &C, )

Process readable object: Send input to the line processor

Source

fn process_files<W: Write>( &self, line_processor: &P, files: &Vec<&str>, writable: W, context: &C, )

Process files: Send them to the line processor

Source

fn process<W: Write>( &self, line_processor: &P, files: &Vec<&str>, writable: &mut W, context: &C, )

Read lines from the input files or STDIN and send them to the processor. Results go to defined output

Source

fn process_to_stdout(&self, line_processor: &P, files: &Vec<&str>, context: &C)

Read lines from the input files or STDIN and write results to STDOUT

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§