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§
fn to_key(&self) -> Result<GasMetricsKey>
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.
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.
fn to_key(&self) -> Result<GasMetricsKey>
Source§impl GasMetricsKeySource for &Timestamp
Implements GasMetricsKeySource
for &[Timestamp
], converting it to a GasMetricsKey
.
impl GasMetricsKeySource for &Timestamp
Implements GasMetricsKeySource
for &[Timestamp
], converting it to a GasMetricsKey
.
fn to_key(&self) -> Result<GasMetricsKey>
Source§impl GasMetricsKeySource for u64
Implements GasMetricsKeySource
for u64
, converting it to a GasMetricsKey
.
impl GasMetricsKeySource for u64
Implements GasMetricsKeySource
for u64
, converting it to a GasMetricsKey
.