Struct tokei::Stats
[−]
[src]
pub struct Stats { pub blanks: usize, pub code: usize, pub comments: usize, pub lines: usize, pub name: PathBuf, }
A struct representing the statistics of a file.
Fields
blanks: usize
Number of blank lines within the file.
code: usize
Number of lines of code within the file.
comments: usize
Number of comments within the file. (includes both multi line, and single line comments)
lines: usize
Total number of lines within the file.
name: PathBuf
File name.
Methods
impl Stats
[src]
fn new(name: PathBuf) -> Self
Create a new Stats
from a file path.
use std::path::PathBuf; use tokei::Stats; let path = PathBuf::from("src/main.rs"); let stats = Stats::new(path);
Trait Implementations
impl Clone for Stats
[src]
fn clone(&self) -> Stats
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 Debug for Stats
[src]
impl Eq for Stats
[src]
impl Ord for Stats
[src]
fn cmp(&self, __arg_0: &Stats) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialEq for Stats
[src]
fn eq(&self, __arg_0: &Stats) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Stats) -> bool
This method tests for !=
.
impl PartialOrd for Stats
[src]
fn partial_cmp(&self, __arg_0: &Stats) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Stats) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Stats) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Stats) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Stats) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more