#[non_exhaustive]pub enum TimerLabelError {
Empty,
TooLong {
actual_bytes: usize,
max_bytes: usize,
},
SurroundingWhitespace,
ControlCharacter {
byte_index: usize,
character: char,
},
}Expand description
Invalid timer identity label.
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.
Empty
Labels must not be empty.
TooLong
Labels must fit the documented UTF-8 byte bound.
Fields
SurroundingWhitespace
Leading and trailing whitespace makes metric labels hard to distinguish.
ControlCharacter
Control characters are not portable operator labels.
Trait Implementations§
Source§impl Clone for TimerLabelError
impl Clone for TimerLabelError
Source§fn clone(&self) -> TimerLabelError
fn clone(&self) -> TimerLabelError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimerLabelError
impl Debug for TimerLabelError
Source§impl Display for TimerLabelError
impl Display for TimerLabelError
impl Eq for TimerLabelError
Source§impl Error for TimerLabelError
impl Error for TimerLabelError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for TimerLabelError
impl PartialEq for TimerLabelError
impl StructuralPartialEq for TimerLabelError
Auto Trait Implementations§
impl Freeze for TimerLabelError
impl RefUnwindSafe for TimerLabelError
impl Send for TimerLabelError
impl Sync for TimerLabelError
impl Unpin for TimerLabelError
impl UnsafeUnpin for TimerLabelError
impl UnwindSafe for TimerLabelError
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