Trait GasMetricsKeySource

Source
pub trait GasMetricsKeySource {
    // Required method
    fn to_key(&self) -> Result<GasMetricsKey>;
}
Expand description

Provides a unified method for creating new instances of GasMetricKeys using various time representations: Timestamp, u64 timestamp, or &str timestamp.

Required Methods§

Implementations on Foreign Types§

Source§

impl GasMetricsKeySource for &str

Implements GasMetricsKeySource for string slices, converting a &str in the YYYY-MM-DD HH:mm:ss UTC format to a GasMetricsKey. Returns an Error::ParseFailed error if the provided timestamp string slice is invalid.

Source§

impl GasMetricsKeySource for &Timestamp

Implements GasMetricsKeySource for &Timestamp, converting it to a GasMetricsKey.

Source§

impl GasMetricsKeySource for u64

Implements GasMetricsKeySource for u64, converting it to a GasMetricsKey.

Implementors§