pub enum Variant {
Show 19 variants
Constant(f32),
Variable(String),
Condition(Condition),
GeoDistance(GeoDistance),
Datetime(String),
DatetimeKey(String),
Mult(MultExpression),
Sum(SumExpression),
Div(Box<DivExpression>),
Neg(Box<Expression>),
Abs(Box<Expression>),
Sqrt(Box<Expression>),
Pow(Box<PowExpression>),
Exp(Box<Expression>),
Log10(Box<Expression>),
Ln(Box<Expression>),
ExpDecay(Box<DecayParamsExpression>),
GaussDecay(Box<DecayParamsExpression>),
LinDecay(Box<DecayParamsExpression>),
}Variants§
Constant(f32)
Variable(String)
Payload key or reference to score.
Condition(Condition)
Payload condition. If true, becomes 1.0; otherwise 0.0
GeoDistance(GeoDistance)
Geographic distance in meters
Datetime(String)
Date-time constant
DatetimeKey(String)
Payload key with date-time values
Mult(MultExpression)
Multiply
Sum(SumExpression)
Sum
Div(Box<DivExpression>)
Divide
Neg(Box<Expression>)
Negate
Abs(Box<Expression>)
Absolute value
Sqrt(Box<Expression>)
Square root
Pow(Box<PowExpression>)
Power
Exp(Box<Expression>)
Exponential
Log10(Box<Expression>)
Logarithm
Ln(Box<Expression>)
Natural logarithm
ExpDecay(Box<DecayParamsExpression>)
Exponential decay
GaussDecay(Box<DecayParamsExpression>)
Gaussian decay
LinDecay(Box<DecayParamsExpression>)
Linear decay
Implementations§
Source§impl Variant
impl Variant
Sourcepub fn merge(
field: &mut Option<Variant>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<Variant>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
impl StructuralPartialEq for Variant
Auto Trait Implementations§
impl Freeze for Variant
impl RefUnwindSafe for Variant
impl Send for Variant
impl Sync for Variant
impl Unpin for Variant
impl UnwindSafe for Variant
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request