Enum lcov_parser::record::LCOVRecord [] [src]

pub enum LCOVRecord {
    TestName(String),
    SourceFile(String),
    Data(u32u32Option<String>),
    FunctionName(u32String),
    FunctionData(u32String),
    FunctionsFound(u32),
    FunctionsHit(u32),
    LinesHit(u32),
    LinesFound(u32),
    BranchData(u32u32u32u32),
    BranchesFound(u32),
    BranchesHit(u32),
    EndOfRecord,
}

Variants

TestName(String)SourceFile(String)Data(u32u32Option<String>)FunctionName(u32String)FunctionData(u32String)FunctionsFound(u32)FunctionsHit(u32)LinesHit(u32)LinesFound(u32)BranchData(u32u32u32u32)BranchesFound(u32)BranchesHit(u32)EndOfRecord

Trait Implementations

impl Clone for LCOVRecord
[src]

fn clone(&self) -> LCOVRecord

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl PartialEq for LCOVRecord
[src]

fn eq(&self, __arg_0: &LCOVRecord) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &LCOVRecord) -> bool

This method tests for !=.

impl Debug for LCOVRecord
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<'a> From<&'a [u8]> for LCOVRecord
[src]

Parse the record from [u8].

Examples

use lcov_parser:: { LCOVRecord };

let actual = LCOVRecord::from("TN:product_test\n".as_bytes());
let expected = LCOVRecord::TestName("product_test".to_string());

assert_eq!(actual, expected);

fn from(input: &'a [u8]) -> Self

Performs the conversion.

impl<'a> From<&'a str> for LCOVRecord
[src]

Parse the record from &str.

Examples

use lcov_parser:: { LCOVRecord };

let actual = LCOVRecord::from("TN:product_test\n");
let expected = LCOVRecord::TestName("product_test".to_string());

assert_eq!(actual, expected);

fn from(input: &'a str) -> Self

Performs the conversion.

impl<'a> From<&'a Vec<u8>> for LCOVRecord
[src]

Parse the record from Vec.

Examples

use lcov_parser:: { LCOVRecord };

let input: Vec<u8> = "TN:product_test\n".bytes().collect();

let actual = LCOVRecord::from(&input);
let expected = LCOVRecord::TestName("product_test".to_string());

assert_eq!(actual, expected);

fn from(input: &'a Vec<u8>) -> Self

Performs the conversion.