Struct chase::Chaser
[−]
[src]
pub struct Chaser { /* fields omitted */ }
Methods
impl Chaser
[src]
fn new(path: &str) -> Chaser
[src]
fn set_path(&mut self, path: &str)
[src]
fn get_path(&self) -> &str
[src]
fn get_line(&self) -> Line
[src]
fn set_line(&mut self, line: Line)
[src]
fn get_rotation_check_wait(&self) -> &Duration
[src]
fn set_rotation_check_wait(&mut self, duration: Duration)
[src]
fn get_not_rotated_wait(&self) -> &Duration
[src]
fn set_not_rotated_wait(&mut self, duration: Duration)
[src]
fn get_rotation_check_attempts(&self) -> Option<usize>
[src]
fn set_rotation_check_attempts(&mut self, attempts: Option<usize>)
[src]
impl Chaser
[src]
fn run<F>(&mut self, f: F) -> Result<(), ChaseError> where
F: FnMut(&str, Line, Pos) -> Result<(), ChaseError>,
[src]
F: FnMut(&str, Line, Pos) -> Result<(), ChaseError>,
Start chasing a file synchronously.
The provided callback function will be invoked whenever a line is read.
impl Chaser
[src]
fn run_channel(
self
) -> Result<(Receiver<(String, Line, Pos)>, JoinHandle<Result<(), ChaseError>>), ChaseError>
[src]
self
) -> Result<(Receiver<(String, Line, Pos)>, JoinHandle<Result<(), ChaseError>>), ChaseError>
Consumes the given chaser and gives you back a standard lib Channel to read from