pub fn start_sink<P: Pusher<String>>(pusher: P) {
    let stdin = io::stdin();
    let handle = stdin.lock();

    for line in handle.lines() {
        // Okay to panic here
        let line = line.unwrap();
        if let Some(parsed_line) = extract_time_series_data(line) {
            pusher.push(parsed_line).unwrap();
        }
    }
}
/// Runs a loop which parses metrics from stdin and pushes the parsed lines into
/// a given accumulator
Runs a loop which parses metrics from stdin and pushes the parsed lines into
a given accumulator
Runs a loop which parses metrics from stdin and pushes the parsed lines into a given accumulator
pub fn start_sink<P: Pusher<String>>(pusher: P) {
    let stdin = io::stdin();
    let handle = stdin.lock();
    for line in handle.lines() {
        // Okay to panic here
        let line = line.unwrap();
        if let Some(parsed_line) = extract_time_series_data(line) {
            pusher.push(parsed_line).unwrap();
        }
    }
}
pub fn start_sink < P : Pusher < String > > ( pusher : P ) { let stdin = io :: stdin ( ) ; let handle = stdin . lock ( ) ; for line in handle . lines ( ) { // Okay to panic here let line = line . unwrap ( ) ; if let Some ( parsed_line ) = extract_time_series_data ( line ) { pusher . push ( parsed_line ) . unwrap ( ) ; } } }
Runs a loop which parses metrics from stdin and pushes the parsed lines into
a given accumulator
Runs a loop which parses metrics from stdin and pushes the parsed lines into a given accumulator
pusher
P
pusher
P