Struct cov::reader::Reader [] [src]

pub struct Reader<'si, R> { /* fields omitted */ }

The reader of a GCNO/GCDA file.

Examples

use cov::reader::Reader;
use cov::Interner;
use std::io::Read;
use std::fs::File;

let mut interner = Interner::new();
let file = File::open("test-data/trivial.clang/x.gcno")?;

// read the header.
let mut reader = Reader::new(file, &mut interner)?;
// read the content.
let _gcov = reader.parse()?;

Methods

impl<'si, R: Read> Reader<'si, R>
[src]

[src]

Parses the header of the file, and creates a new gcov reader.

Errors

  • Returns UnknownFileType if the reader is not a in GCNO/GCDA format.
  • Returns UnsupportedVersion if the GCNO/GCDA version is not supported by this crate.
  • Returns Io on I/O failure.

[src]

Parses the content of the reader, to produce a Gcov structure.

Errors

  • Returns UnknownTag if the GCNO/GCDA contains an unrecognized record tag.
  • Returns Io on I/O failure.

Trait Implementations

impl<'si, R: Debug> Debug for Reader<'si, R>
[src]

[src]

Formats the value using the given formatter.