pub enum ValueProvider {
Text,
Closed(&'static [&'static str]),
Number,
HexColor,
Path {
glob: &'static str,
},
DbMetricNames,
DbLabelKeys,
DbLabelKeyValuePairs,
Json,
}Expand description
Enumeration of value-space kinds for one directive’s argument. Drives both completion suggestions and (for closed sets) parser-side validation.
Variants§
Text
Free text — no completion, no validation.
Examples: --label, --xlabel, --ylabel.
Closed(&'static [&'static str])
Closed set of strings. Completion offers exactly these; the parser rejects anything else.
Number
Numeric value (f32 / u32). Completion offers
no suggestions; parser asserts numeric.
HexColor
Hex color (#RRGGBB / #RRGGBBAA). Completion
offers no suggestions; parser asserts the shape.
Path
File-system path (with *.yaml / *.yml filter
for workload paths). Completion plumbing decides.
DbMetricNames
Metric names from the active session db. Completion queries the db at tab time.
DbLabelKeys
Distinct label keys observed in the active session db. Completion queries the db at tab time.
DbLabelKeyValuePairs
key=value pairs where key completes from
Self::DbLabelKeys and value completes from the
distinct values observed for that key. Multi-valued
(comma-separated). Used for --where.
Json
Strict-JSON object literal. No completion.
Used for --series sub-blocks.
Trait Implementations§
Source§impl Clone for ValueProvider
impl Clone for ValueProvider
Source§impl Debug for ValueProvider
impl Debug for ValueProvider
impl Eq for ValueProvider
Source§impl PartialEq for ValueProvider
impl PartialEq for ValueProvider
impl StructuralPartialEq for ValueProvider
Auto Trait Implementations§
impl Freeze for ValueProvider
impl RefUnwindSafe for ValueProvider
impl Send for ValueProvider
impl Sync for ValueProvider
impl Unpin for ValueProvider
impl UnsafeUnpin for ValueProvider
impl UnwindSafe for ValueProvider
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.