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

pub enum LCOVRecord {
    TestName {
        name: String,
    },
    SourceFile {
        file_name: String,
    },
    Data {
        line_number: u32,
        executed_count: u32,
    },
    EndOfRecord,
}

Variants

TestName

Fields

name: String
SourceFile

Fields

file_name: String
Data

Fields

line_number: u32
executed_count: 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 { name: "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 { name: "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 { name: "product_test".to_string() };

assert_eq!(actual, expected);

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

Performs the conversion.