Enum Operator
pub enum Operator {
Show 20 variants
Eq,
EqValidity,
NotEq,
NotEqValidity,
Lt,
LtEq,
Gt,
GtEq,
Plus,
Minus,
Multiply,
RustDivide,
TrueDivide,
FloorDivide,
Modulus,
And,
Or,
Xor,
LogicalAnd,
LogicalOr,
}lazy only.Variants§
Eq
EqValidity
NotEq
NotEqValidity
Lt
LtEq
Gt
GtEq
Plus
Minus
Multiply
RustDivide
Rust division semantics, this is what Rust interface / dispatches to
TrueDivide
Python division semantics, converting to floats. This is what python / operator dispatches to
FloorDivide
Floor division semantics, this is what python // dispatches to
Modulus
And
Or
Xor
LogicalAnd
LogicalOr
Implementations§
§impl Operator
impl Operator
pub fn is_comparison(&self) -> bool
pub fn is_null_propagating_comparison(&self) -> bool
pub fn is_null_propagating_comparison(&self) -> bool
Comparisons that unconditionally propagate nulls: a null operand gives a
null result. Excludes the validity variants (EqValidity /
NotEqValidity), which treat null as a regular value.
pub fn is_bitwise(&self) -> bool
pub fn is_comparison_or_bitwise(&self) -> bool
pub fn swap_operands(self) -> Option<Operator>
pub fn swap_operands(self) -> Option<Operator>
The operator such that b op.swap_operands() a is equivalent to
a op b; None for non-commutative arithmetic, where no such operator
exists (swapping requires rewriting an operand: a - b == -b + a).
pub fn negate(self) -> Option<Operator>
pub fn negate(self) -> Option<Operator>
The complementary comparison, such that !(a op b) is equivalent to
a op.negate() b; None for non-comparison operators. Exact because
nulls stay null under negation (Kleene logic) and Polars orders floats
totally, unlike IEEE (where !(a < b) does not imply a >= b for NaN).
pub fn is_arithmetic(&self) -> bool
Trait Implementations§
§impl<'de> Deserialize<'de> for Operator
impl<'de> Deserialize<'de> for Operator
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Operator, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Operator, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl From<InequalityOperator> for Operator
Available on crate feature iejoin only.
impl From<InequalityOperator> for Operator
iejoin only.§fn from(value: InequalityOperator) -> Operator
fn from(value: InequalityOperator) -> Operator
§impl Serialize for Operator
impl Serialize for Operator
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for Operator
impl Eq for Operator
impl StructuralPartialEq for Operator
Auto Trait Implementations§
impl Freeze for Operator
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnsafeUnpin for Operator
impl UnwindSafe for Operator
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more