We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62d1c7d commit 37b6460Copy full SHA for 37b6460
src/expressions.rs
@@ -20,6 +20,20 @@ impl Expression {
20
}
21
22
23
+ /// Creates a new Expression with a reference to the score of the prefetch.
24
+ pub fn score() -> Self {
25
+ Self {
26
+ variant: Some(expression::Variant::Variable("$score".to_string())),
27
+ }
28
29
+
30
+ /// Creates a new Expression with a reference to the score of a specific prefetch, when there are multiple prefetches.
31
+ pub fn score_idx(idx: usize) -> Self {
32
33
+ variant: Some(expression::Variant::Variable(format!("$score[{idx}]"))),
34
35
36
37
/// Creates a new Expression with a condition. If true, becomes 1.0; otherwise 0.0.
38
pub fn condition<C: Into<Condition>>(condition: C) -> Self {
39
Self {
0 commit comments