[][src]Struct lcov::reader::Reader

pub struct Reader<B> { /* fields omitted */ }

Reading an LCOV records from a buffered reader.

Implementations

impl<B> Reader<B>[src]

pub fn new(buf: B) -> Self where
    B: BufRead
[src]

Creates a new Reader.

Examples

use std::io::BufReader;
use std::fs::File;
use lcov::Reader;

let input = "\
TN:test_name
SF:/path/to/source/file.rs
DA:1,2
DA:3,0
DA:5,6
LF:3
LH:2
end_of_record
";

let reader = Reader::new(input.as_bytes());

impl Reader<BufReader<File>>[src]

pub fn open_file<P>(path: P) -> Result<Self, Error> where
    P: AsRef<Path>, 
[src]

Opens an LCOV tracefile.

Example

use lcov::Reader;
let reader = Reader::open_file("report.info")?;

Trait Implementations

impl<B: Debug> Debug for Reader<B>[src]

impl<B> Iterator for Reader<B> where
    B: BufRead
[src]

type Item = Result<Record, Error>

The type of the elements being iterated over.

Auto Trait Implementations

impl<B> RefUnwindSafe for Reader<B> where
    B: RefUnwindSafe

impl<B> Send for Reader<B> where
    B: Send

impl<B> Sync for Reader<B> where
    B: Sync

impl<B> Unpin for Reader<B> where
    B: Unpin

impl<B> UnwindSafe for Reader<B> where
    B: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.