Struct quil::instruction::PyArithmetic
source · #[repr(transparent)]pub struct PyArithmetic(_);Implementations§
source§impl PyArithmetic
impl PyArithmetic
pub fn new( py: Python<'_>, operator: PyArithmeticOperator, destination: PyArithmeticOperand, source: PyArithmeticOperand ) -> PyResult<Self>
pub fn __richcmp__( &self, py: Python<'_>, other: &Self, op: CompareOp ) -> PyObject
Trait Implementations§
source§impl AsMut<<PyArithmetic as PyWrapper>::Inner> for PyArithmetic
impl AsMut<<PyArithmetic as PyWrapper>::Inner> for PyArithmetic
source§impl AsRef<Arithmetic> for PyArithmetic
impl AsRef<Arithmetic> for PyArithmetic
source§fn as_ref(&self) -> &Arithmetic
fn as_ref(&self) -> &Arithmetic
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for PyArithmetic
impl Clone for PyArithmetic
source§fn clone(&self) -> PyArithmetic
fn clone(&self) -> PyArithmetic
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 PyArithmetic
impl Debug for PyArithmetic
source§impl From<&Arithmetic> for PyArithmetic
impl From<&Arithmetic> for PyArithmetic
source§fn from(inner: &Arithmetic) -> Self
fn from(inner: &Arithmetic) -> Self
Converts to this type from the input type.
source§impl From<Arithmetic> for PyArithmetic
impl From<Arithmetic> for PyArithmetic
source§fn from(inner: Arithmetic) -> Self
fn from(inner: Arithmetic) -> Self
Converts to this type from the input type.
source§impl From<PyArithmetic> for Arithmetic
impl From<PyArithmetic> for Arithmetic
source§fn from(wrapper: PyArithmetic) -> Self
fn from(wrapper: PyArithmetic) -> Self
Converts to this type from the input type.
source§impl PartialEq<PyArithmetic> for PyArithmetic
impl PartialEq<PyArithmetic> for PyArithmetic
source§fn eq(&self, other: &PyArithmetic) -> bool
fn eq(&self, other: &PyArithmetic) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PyClassImpl for PyArithmetic
impl PyClassImpl for PyArithmetic
source§const IS_BASETYPE: bool = true
const IS_BASETYPE: bool = true
#[pyclass(subclass)]
source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
§type Layout = PyCell<PyArithmetic>
type Layout = PyCell<PyArithmetic>
Layout
§type ThreadChecker = ThreadCheckerStub<PyArithmetic>
type ThreadChecker = ThreadCheckerStub<PyArithmetic>
This handles following two situations: Read more
type Inventory = Pyo3MethodsInventoryForPyArithmetic
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyArithmetic
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyArithmetic
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut PyArithmetic
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut PyArithmetic
source§impl PyTryFrom<PyAny> for PyArithmetic
impl PyTryFrom<PyAny> for PyArithmetic
source§impl PyTryFrom<PyArithmetic> for Arithmetic
impl PyTryFrom<PyArithmetic> for Arithmetic
source§fn py_try_from(py: Python<'_>, item: &PyArithmetic) -> PyResult<Self>
fn py_try_from(py: Python<'_>, item: &PyArithmetic) -> PyResult<Self>
source§impl PyTryFrom<PyArithmetic> for PyArithmetic
impl PyTryFrom<PyArithmetic> for PyArithmetic
source§fn py_try_from(py: Python<'_>, item: &PyArithmetic) -> PyResult<Self>
fn py_try_from(py: Python<'_>, item: &PyArithmetic) -> PyResult<Self>
source§impl PyTypeInfo for PyArithmetic
impl PyTypeInfo for PyArithmetic
§type AsRefTarget = PyCell<PyArithmetic>
type AsRefTarget = PyCell<PyArithmetic>
Utility type to make Py::as_ref work.
source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
source§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.
source§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
Checks if
object is an instance of this type or a subclass of this type.source§fn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
Checks if
object is an instance of this type.source§impl PyWrapper for PyArithmetic
impl PyWrapper for PyArithmetic
source§impl ToPyObject for PyArithmetic
impl ToPyObject for PyArithmetic
source§impl<'a> ToPython<PyArithmetic> for &'a Arithmetic
impl<'a> ToPython<PyArithmetic> for &'a Arithmetic
source§impl ToPython<PyArithmetic> for Arithmetic
impl ToPython<PyArithmetic> for Arithmetic
impl StructuralPartialEq for PyArithmetic
Auto Trait Implementations§
impl RefUnwindSafe for PyArithmetic
impl Send for PyArithmetic
impl Sync for PyArithmetic
impl Unpin for PyArithmetic
impl UnwindSafe for PyArithmetic
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<'a, T> FromPyObject<'a> for Twhere
T: PyClass + Clone,
impl<'a, T> FromPyObject<'a> for Twhere T: PyClass + Clone,
source§impl<T> PyWrapperMut for Twhere
T: PyWrapper + AsMut<<T as PyWrapper>::Inner>,
impl<T> PyWrapperMut for Twhere T: PyWrapper + AsMut<<T as PyWrapper>::Inner>,
source§fn as_inner_mut(&mut self) -> &mut Self::Inner
fn as_inner_mut(&mut self) -> &mut Self::Inner
Returns a mutable reference to the inner item. Read more
source§impl<T> ToBorrowedObject for Twhere
T: ToPyObject,
impl<T> ToBorrowedObject for Twhere T: ToPyObject,
source§fn with_borrowed_ptr<F, R>(&self, py: Python<'_>, f: F) -> Rwhere
F: FnOnce(*mut PyObject) -> R,
fn with_borrowed_ptr<F, R>(&self, py: Python<'_>, f: F) -> Rwhere F: FnOnce(*mut PyObject) -> R,
👎Deprecated since 0.17.0: this trait is no longer used by PyO3, use ToPyObject or IntoPy<PyObject>
Converts self into a Python object and calls the specified closure
on the native FFI pointer underlying the Python object. Read more