[][src]Trait ccache_stats_reader::CacheFieldCollection

pub trait CacheFieldCollection {
    fn fields(&self) -> &CacheFieldData;
fn mtime(&self) -> &DateTime<Utc>; fn get_field(&self, f: CacheField) -> u64 { ... }
fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = (CacheField, u64)> + 'a> { ... }
fn write_raw(&self, fh: impl Write) -> Result<(), ErrorKind> { ... }
fn write_pretty(&self, fh: impl Write) -> Result<(), ErrorKind> { ... } }

An abstact representation of 'a thing' that can expose data about its unit.

Required methods

fn fields(&self) -> &CacheFieldData

Returns a struct containing data recorded for this thing

fn mtime(&self) -> &DateTime<Utc>

Returns a timestamp indicating time of last modification/update

Loading content...

Provided methods

fn get_field(&self, f: CacheField) -> u64

Returns a value for the named field

fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = (CacheField, u64)> + 'a>

Returns an iterator of (field, value) pairs in display order to simplify loop and chain flow controls

fn write_raw(&self, fh: impl Write) -> Result<(), ErrorKind>

Writes the data in this collection to the designated destination (such as std::io::stdout) in a format similar to that produced by ccache --print-stats

fn write_pretty(&self, fh: impl Write) -> Result<(), ErrorKind>

Writes the data in this collection to the designated destination (such as std::io::stdout) in a format similar to that produced by ccache -s

Loading content...

Implementors

impl CacheFieldCollection for CacheDir[src]

impl CacheFieldCollection for CacheLeaf[src]

Loading content...