Struct metrics_sqlite::SqliteExporter[][src]

pub struct SqliteExporter { /* fields omitted */ }

Exports metrics by storing them in a SQLite database at a periodic interval

Implementations

impl SqliteExporter[src]

pub fn new<P: AsRef<Path>>(
    flush_interval: Duration,
    keep_duration: Option<Duration>,
    path: P
) -> Result<Self>
[src]

Creates a new SqliteExporter that stores metrics in a SQLite database file.

flush_interval specifies how often metrics are flushed to SQLite/disk

keep_duration specifies how long data is kept before deleting, performed new()

pub fn install(self) -> Result<(), SetRecorderError>[src]

Install recorder as metrics crate’s Recorder

Trait Implementations

impl Drop for SqliteExporter[src]

impl Recorder for SqliteExporter[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> IntoSql 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.