Expand description

Module representing an entry in the timelog.

Examples

use timelog::entry::Entry;
use std::fs::File;
use std::io::{BufRead, BufReader};

fn day_entrys(date: &str, file: &mut File) -> Vec<Entry> {
    let mut reader = BufReader::new(file);
    reader.lines()
          .filter_map(|line| Entry::from_line(&line.ok()?).ok())
          .filter(|ev| ev.stamp() == String::from(date))
          .collect::<Vec<Entry>>()
}

Description

Objects of this type represent the individual lines in the timelog.txt file. Each Entry has a date and time stamp, an optional project, and a task.

Modules

Module representing errors encountered parsing entry lines.

Module representing the kind of an entry.

Structs

Representation of an entry in the log

Regular expression extracting the marker from the line.

A regular expression matching the project part of an entry line.

Regular expression matching the year portion of an entry line.

Type Definitions

Errors associated with the entry.

The kind of entry