rqlite_client 0.0.1-alpha.5

rqlite database client with optional extra convenience
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Trait implementation for `time` value as `u64` and `Duration`

/// Trait implementation for `time` value as `u64` and `Duration`
pub trait Timed {
    /// Get optional `time` of response timing
    #[must_use]
    fn time(&self) -> Option<f64>;

    /// Get optional `time` as `Duration`
    #[must_use]
    #[inline]
    fn duration(&self) -> Option<std::time::Duration> {
        self.time().map(std::time::Duration::from_secs_f64)
    }
}