Function t2plugin::output_string [] [src]

pub fn output_string<T: AsRef<str>>(string: T)

Appends a string to Tranalyzer2 output buffer.

This function can be called in the on_flow_terminate method to append a string to the output flow file.

Example

struct HttpPlugin {
    ...
    host: String,
}

impl T2Plugin for HttpPlugin {
    ...
    #[allow(unused_variables)]
    fn on_flow_terminate(&mut self, flow: &mut Flow) {
        // output the HTTP host in a bt_string column
        output_string(&self.host);
    }
}