4 releases

Uses old Rust 2015

0.1.3 Jan 3, 2018
0.1.2 Jan 3, 2018
0.1.1 Jan 3, 2018
0.1.0 Jan 3, 2018

#8 in #exploration

MIT license

9KB
169 lines

nom-syslog

Crude parsing of rfc3164 syslog as nom exploration.

extern create nom_syslog;

// somewhere in your code
// ..
    parsed = nom_syslog::parse_syslog(data : &str)
    if !parsed.is_done() {
        // buffer too small? malformed data? our rules a little wrong?
    } else {
        // the message is ready!
        let (_leftover_buf, message) = parsed_res.unwrap();
        // do something cool!
    }
// ..

Dependencies

~2MB
~37K SLoC