#[non_exhaustive]pub enum ResetHint {
Unknown,
Reset,
NoReset,
Gauge,
}Expand description
What is known about counter resets between this sample and the previous.
A histogram is usually a counter: buckets only grow. A reset — a process
restart — has to be visible to rate(), and the scraper often knows
without the database having to guess.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown
Nothing is known; a reader must detect resets by comparing samples.
Reset
This is the first histogram after a counter reset.
NoReset
There was no reset between this sample and the previous one.
Gauge
A gauge histogram: counter resets do not apply.
Trait Implementations§
impl Copy for ResetHint
Source§impl<'de> Deserialize<'de> for ResetHint
impl<'de> Deserialize<'de> for ResetHint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ResetHint
impl StructuralPartialEq for ResetHint
Auto Trait Implementations§
impl Freeze for ResetHint
impl RefUnwindSafe for ResetHint
impl Send for ResetHint
impl Sync for ResetHint
impl Unpin for ResetHint
impl UnsafeUnpin for ResetHint
impl UnwindSafe for ResetHint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more