Struct tokei::Language[][src]

pub struct Language {
    pub blanks: usize,
    pub code: usize,
    pub comments: usize,
    pub lines: usize,
    pub stats: Vec<Stats>,
}

Struct representing a single Language.

Fields

Number of blank lines.

Number of lines of code.

Number of comments(both single, and multi-line)

Number of total lines.

A collection of statistics based on the files provide from files

Methods

impl Language
[src]

Constructs a new empty Language with the comments provided.

let mut rust = Language::new();

Adds file stats to the Language.

Totals up all the statistics currently in the language.

Checks if the language is empty. Empty meaning it doesn't have any statistics.

let rust = Language::new();

assert!(rust.is_empty());

Sorts each of the Stats structs contained in the language based on what category is provided panic!'s if given the wrong category.

Trait Implementations

impl Clone for Language
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Language
[src]

Formats the value using the given formatter. Read more

impl Default for Language
[src]

Returns the "default value" for a type. Read more

impl AddAssign for Language
[src]

Performs the += operation.

Auto Trait Implementations

impl Send for Language

impl Sync for Language