read_tail_lines

Function read_tail_lines 

Source
pub fn read_tail_lines<R: Read + Seek>(
    rs: &mut R,
    total_size: u64,
    line_count: usize,
    line_offset: usize,
    read_limit: u64,
) -> Result<(Vec<String>, String)>
Expand description

Read the last line_count lines from a seekable reader with a byte limit.

Progressively reads larger sections from the end (starting at 1MB, doubling) until enough lines are found or the limit is reached.

Returns (lines, stop_reason).