[][src]Enum ccache_stats_reader::CacheField

#[non_exhaustive]
pub enum CacheField {
    None,
    StdOut,
    Status,
    Error,
    ToCache,
    PreProcessor,
    Compiler,
    Missing,
    CacheHitCpp,
    Args,
    Link,
    NumFiles,
    TotalSize,
    ObsoleteMaxFiles,
    ObsoleteMaxSize,
    SourceLang,
    BadOutputFile,
    NoInput,
    Multiple,
    ConfTest,
    UnsupportedOption,
    OutStdOut,
    CacheHitDir,
    NoOutput,
    EmptyOutput,
    BadExtraFile,
    CompCheck,
    CantUsePch,
    PreProcessing,
    NumCleanUps,
    UnsupportedDirective,
    ZeroTimeStamp,
}

An enum based field definition for ccache's data fields.

This logic is liberally cribbed from similar definitions in upstream's ccache.hpp (formerly ccache.h).

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None

Silly implementation detail

StdOut

Counter of instances where the compiler produced stdout

Status

Counter of compile failures

Error

Counter of internal errors in ccache

ToCache

Counter of cache misses

PreProcessor

Counter of preprocessor errors

Compiler

Counter of being unable to find the compiler

Missing

Counter of ccache being unable to find a file in cache

CacheHitCpp

Counter of pre-processed cache-hits

Args

Counter of bad compiler arguments

Counter of ccache being called for link

NumFiles

Counter of the number of files in the cache

TotalSize

Counter of the total size of the cache

ObsoleteMaxFiles

(Obsolete) Maximum files in cache

ObsoleteMaxSize

(Obsolete) Maximum size of cache

SourceLang

Counts of being called with an unsupported source language

BadOutputFile

Counts of being unable to write to output file

NoInput

Counts of being called without an input file

Multiple

Counter of calls with multiple source files

ConfTest

Counter of autoconf compiles/links

UnsupportedOption

Counter of calling compiler with an unsupported option

OutStdOut

Counter of output to stdout

CacheHitDir

Counter of direct cache hits

NoOutput

Counter of compiler producing no output

EmptyOutput

Counter of compiler producing empty output

BadExtraFile

Counter of encountering an error hashing an extra file

CompCheck

Counter of failed compiler checks

CantUsePch

Counter of being unable to use a precompiled header

PreProcessing

Counter of being called for pre-processing

NumCleanUps

Counter of cache cleanups performed

UnsupportedDirective

Counter of unsupported code directives

ZeroTimeStamp

Counter of when the stats were last zeroed

Methods

impl CacheField[src]

pub fn as_usize(self) -> usize[src]

Return this enums integer as a usize for array access purposes.

pub fn format_value(self, value: u64) -> String[src]

Format a given u64 as per the format type of this field

println!("{}", CacheField::ZeroTimeStamp.format_value(0));
assert_eq!(CacheField::TotalSize.format_value(100), "100 Kb");

pub fn metadata(self) -> &'static CacheFieldMeta[src]

Obtain a CacheFieldMeta describing the properties of this field

Trait Implementations

impl Clone for CacheField[src]

impl Copy for CacheField[src]

impl Debug for CacheField[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]