[][src]Function syslog_loose::parse_message_with_year_exact

pub fn parse_message_with_year_exact<F>(
    input: &str,
    get_year: F
) -> Result<Message<&str>, String> where
    F: FnOnce(IncompleteDate) -> i32 + Copy

Pase the message exactly. If it can't parse the message an Error is returned. Note, since it is hard to locate exactly what is causing the error due to the parser trying so many different combinations, a simple hardcoded string is returned as the error message.

Arguments

  • input - the string containing the message.
  • get_year - a function that is called if the parsed message contains a date with no year. the function takes a (month, date, hour, minute, second) tuple and should return the year to use.