Enum primitives::targeting::Function
source · pub enum Function {
Show 34 variants
MulDiv(Box<Rule>, Box<Rule>, Box<Rule>),
Div(Box<Rule>, Box<Rule>),
Mul(Box<Rule>, Box<Rule>),
Mod(Box<Rule>, Box<Rule>),
Add(Box<Rule>, Box<Rule>),
Sub(Box<Rule>, Box<Rule>),
Max(Box<Rule>, Box<Rule>),
Min(Box<Rule>, Box<Rule>),
If(Box<Rule>, Box<Rule>),
IfNot(Box<Rule>, Box<Rule>),
IfElse(Box<Rule>, Box<Rule>, Box<Rule>),
And(Box<Rule>, Box<Rule>),
Or(Box<Rule>, Box<Rule>),
Xor(Box<Rule>, Box<Rule>),
Not(Box<Rule>),
Lt(Box<Rule>, Box<Rule>),
Lte(Box<Rule>, Box<Rule>),
Gt(Box<Rule>, Box<Rule>),
Gte(Box<Rule>, Box<Rule>),
Eq(Box<Rule>, Box<Rule>),
Neq(Box<Rule>, Box<Rule>),
In(Box<Rule>, Box<Rule>),
Nin(Box<Rule>, Box<Rule>),
At(Box<Rule>, Box<Rule>),
Between(Box<Rule>, Box<Rule>, Box<Rule>),
Split(Box<Rule>, Box<Rule>),
StartsWith(Box<Rule>, Box<Rule>),
EndsWith(Box<Rule>, Box<Rule>),
OnlyShowIf(Box<Rule>),
Intersects(Box<Rule>, Box<Rule>),
Do(Box<Rule>),
Get(String),
Set(String, Box<Rule>),
Bn(Value),
}Variants
MulDiv(Box<Rule>, Box<Rule>, Box<Rule>)
Multiplies first two values and then divides product by third value
Div(Box<Rule>, Box<Rule>)
Mul(Box<Rule>, Box<Rule>)
Mod(Box<Rule>, Box<Rule>)
Add(Box<Rule>, Box<Rule>)
Sub(Box<Rule>, Box<Rule>)
Max(Box<Rule>, Box<Rule>)
Min(Box<Rule>, Box<Rule>)
If(Box<Rule>, Box<Rule>)
IfNot(Box<Rule>, Box<Rule>)
IfElse(Box<Rule>, Box<Rule>, Box<Rule>)
And(Box<Rule>, Box<Rule>)
Or(Box<Rule>, Box<Rule>)
Xor(Box<Rule>, Box<Rule>)
Not(Box<Rule>)
Lt(Box<Rule>, Box<Rule>)
Is the first value Lesser than second value
Lte(Box<Rule>, Box<Rule>)
Is the first value Lesser than or equal to the second value
Gt(Box<Rule>, Box<Rule>)
Is the first value Greater than second value
Gte(Box<Rule>, Box<Rule>)
Is the first value Greater than or equal to the second value
Eq(Box<Rule>, Box<Rule>)
Are values equal
Neq(Box<Rule>, Box<Rule>)
Are values NOT equal
In(Box<Rule>, Box<Rule>)
Is first value included in an array (second value)
Nin(Box<Rule>, Box<Rule>)
Is first value NOT included in an array (second value)
At(Box<Rule>, Box<Rule>)
Gets the element at a certain position (second value) of an array (first value)
Between(Box<Rule>, Box<Rule>, Box<Rule>)
Note: this is inclusive of the start and end value 0 - start 1 - end 2 - value
Split(Box<Rule>, Box<Rule>)
StartsWith(Box<Rule>, Box<Rule>)
EndsWith(Box<Rule>, Box<Rule>)
OnlyShowIf(Box<Rule>)
Intersects(Box<Rule>, Box<Rule>)
Do(Box<Rule>)
Evaluates rule
Get(String)
Set(String, Box<Rule>)
Output variables can be set any number of times by different rules, except show
if show is at any point set to false, we stop executing rules and don’t show the ad.
Bn(Value)
Bn(Value) function.