pub struct ReturnValue {
pub kind: ReturnKind,
pub label_ops: Vec<LabelSetOpTuple>,
}
Expand description
A predicted return value from an expression
Fields§
§kind: ReturnKind
§label_ops: Vec<LabelSetOpTuple>
A stack of operations applied to original source labels
Implementations§
Source§impl ReturnValue
impl ReturnValue
pub fn unknown<S>(message: S, expression: Expression) -> Self
pub fn label_op(&mut self, op: LabelSetOpTuple) -> &mut Self
Sourcepub fn passthrough(&self, input_labels: &[&str]) -> HashSet<String>
pub fn passthrough(&self, input_labels: &[&str]) -> HashSet<String>
Given a number of input label keys, returns a set of labels expected to be present on all returned time series
Note that more labels may be returned than were provided in the input set; expressions that explicitly select for or group on labels will
Sourcepub fn drops(&self, label: &str) -> Option<&LabelSetOpTuple>
pub fn drops(&self, label: &str) -> Option<&LabelSetOpTuple>
Determines the operation (plus expression and span) that caused the given
label to be dropped. If the label is never dropped, returns None
.
This also accounts for expressions that drop a label and re-add it later, for instance with an aggregation clause.
Trait Implementations§
Source§impl Clone for ReturnValue
impl Clone for ReturnValue
Source§fn clone(&self) -> ReturnValue
fn clone(&self) -> ReturnValue
Returns a duplicate of the value. Read more
1.0.0 · 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 ReturnValue
impl Debug for ReturnValue
Source§impl PartialEq for ReturnValue
impl PartialEq for ReturnValue
impl StructuralPartialEq for ReturnValue
Auto Trait Implementations§
impl Freeze for ReturnValue
impl RefUnwindSafe for ReturnValue
impl Send for ReturnValue
impl Sync for ReturnValue
impl Unpin for ReturnValue
impl UnwindSafe for ReturnValue
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