pub struct BinaryOp {
pub lhs_expr: Expression,
pub operator: BinaryOperator,
pub rhs_expr: Expression,
}
Expand description
An operation that applies an operator to two expressions.
Fields
lhs_expr: Expression
The expression on the left-hand-side of the operation.
operator: BinaryOperator
The binary operator to use on the expressions.
rhs_expr: Expression
The expression on the right-hand-side of the operation.
Implementations
sourceimpl BinaryOp
impl BinaryOp
sourcepub fn new<L, R>(lhs_expr: L, operator: BinaryOperator, rhs_expr: R) -> BinaryOpwhere
L: Into<Expression>,
R: Into<Expression>,
pub fn new<L, R>(lhs_expr: L, operator: BinaryOperator, rhs_expr: R) -> BinaryOpwhere
L: Into<Expression>,
R: Into<Expression>,
Creates a new BinaryOp
from two expressions and an operator.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for BinaryOp
impl<'de> Deserialize<'de> for BinaryOp
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'de> IntoDeserializer<'de, Error> for BinaryOp
impl<'de> IntoDeserializer<'de, Error> for BinaryOp
type Deserializer = MapAccessDeserializer<BinaryOpAccess>
type Deserializer = MapAccessDeserializer<BinaryOpAccess>
The type of the deserializer being converted into.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
impl Eq for BinaryOp
impl StructuralEq for BinaryOp
impl StructuralPartialEq for BinaryOp
Auto Trait Implementations
impl RefUnwindSafe for BinaryOp
impl Send for BinaryOp
impl Sync for BinaryOp
impl Unpin for BinaryOp
impl UnwindSafe for BinaryOp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.