Struct rustpython_vm::types::PyComparisonOp
source · #[repr(transparent)]pub struct PyComparisonOp(_);
Implementations§
source§impl PyComparisonOp
impl PyComparisonOp
pub fn eq_only( self, f: impl FnOnce() -> PyResult<PyComparisonValue> ) -> PyResult<PyComparisonValue>
pub fn eval_ord(self, ord: Ordering) -> bool
pub fn swapped(self) -> Self
pub fn method_name(self, ctx: &Context) -> &'static PyStrInterned
pub fn operator_token(self) -> &'static str
Trait Implementations§
source§impl Clone for PyComparisonOp
impl Clone for PyComparisonOp
source§fn clone(&self) -> PyComparisonOp
fn clone(&self) -> PyComparisonOp
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PyComparisonOp
impl Debug for PyComparisonOp
source§impl From<ComparisonOperator> for PyComparisonOp
impl From<ComparisonOperator> for PyComparisonOp
source§fn from(op: ComparisonOperator) -> Self
fn from(op: ComparisonOperator) -> Self
Converts to this type from the input type.
source§impl PartialEq<PyComparisonOp> for PyComparisonOp
impl PartialEq<PyComparisonOp> for PyComparisonOp
source§fn eq(&self, other: &PyComparisonOp) -> bool
fn eq(&self, other: &PyComparisonOp) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PyComparisonOp
impl Eq for PyComparisonOp
impl StructuralEq for PyComparisonOp
impl StructuralPartialEq for PyComparisonOp
Auto Trait Implementations§
impl RefUnwindSafe for PyComparisonOp
impl Send for PyComparisonOp
impl Sync for PyComparisonOp
impl Unpin for PyComparisonOp
impl UnwindSafe for PyComparisonOp
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<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.