[−][src]Struct tokei::CodeStats
A struct representing stats about a single blob of code.
Fields (Non-exhaustive)
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.blanks: usize
The blank lines in the blob.
code: usize
The lines of code in the blob.
comments: usize
The lines of comments in the blob.
blobs: BTreeMap<LanguageType, CodeStats>
Language blobs that were contained inside this blob.
Implementations
impl CodeStats
[src]
pub fn new() -> Self
[src]
Creates a new blank CodeStats
.
pub fn lines(&self) -> usize
[src]
Get the total lines in a blob of code.
pub fn summarise(&self) -> Self
[src]
Creates a new CodeStats
from an existing one with all of the child
blobs merged.
Trait Implementations
impl Add<CodeStats> for CodeStats
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
impl AddAssign<CodeStats> for CodeStats
[src]
fn add_assign(&mut self, rhs: Self)
[src]
impl AddAssign<CodeStats> for Report
[src]
fn add_assign(&mut self, rhs: CodeStats)
[src]
impl Clone for CodeStats
[src]
impl Debug for CodeStats
[src]
impl Default for CodeStats
[src]
impl<'de> Deserialize<'de> for CodeStats
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<CodeStats> for CodeStats
[src]
impl Serialize for CodeStats
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for CodeStats
[src]
Auto Trait Implementations
impl RefUnwindSafe for CodeStats
impl Send for CodeStats
impl Sync for CodeStats
impl Unpin for CodeStats
impl UnwindSafe for CodeStats
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,