pyo3::impl_::pyclass

Struct PyClassImplCollector

Source
pub struct PyClassImplCollector<T>(PhantomData<T>);
Expand description

This type is used as a “dummy” type on which dtolnay specializations are applied to apply implementations from #[pymethods]

Tuple Fields§

§0: PhantomData<T>

Implementations§

Source§

impl<T> PyClassImplCollector<T>

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl<T> Clone for PyClassImplCollector<T>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Default for PyClassImplCollector<T>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T> PyClassNewTextSignature<T> for &PyClassImplCollector<T>

Source§

fn new_text_signature(self) -> Option<&'static str>

Source§

impl<T> PyClass__add__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __add__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__and__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __and__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__delattr__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __delattr__( self, _py: Python<'_>, _slf: *mut PyObject, _attr: *mut PyObject, ) -> PyResult<()>

Safety: _slf and _attr must be valid non-null Python objects Read more
Source§

impl<T> PyClass__delete__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __delete__( self, _py: Python<'_>, _slf: *mut PyObject, _attr: *mut PyObject, ) -> PyResult<()>

Safety: _slf and _attr must be valid non-null Python objects Read more
Source§

impl<T> PyClass__delitem__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __delitem__( self, _py: Python<'_>, _slf: *mut PyObject, _attr: *mut PyObject, ) -> PyResult<()>

Safety: _slf and _attr must be valid non-null Python objects Read more
Source§

impl<T> PyClass__divmod__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __divmod__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__eq__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __eq__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__floordiv__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __floordiv__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__ge__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __ge__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__getattr__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __getattr__( self, py: Python<'_>, _slf: *mut PyObject, attr: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _attr must be valid non-null Python objects Read more
Source§

impl<T> PyClass__getattribute__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __getattribute__( self, py: Python<'_>, slf: *mut PyObject, attr: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _attr must be valid non-null Python objects Read more
Source§

impl<T> PyClass__gt__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __gt__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__le__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __le__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__lshift__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __lshift__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__lt__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __lt__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__matmul__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __matmul__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__mod__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __mod__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__mul__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __mul__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__ne__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __ne__( self, py: Python<'_>, slf: *mut PyObject, other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__or__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __or__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__pow__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __pow__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, _mod: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__radd__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __radd__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rand__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rand__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rdivmod__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rdivmod__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rfloordiv__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rfloordiv__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rlshift__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rlshift__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rmatmul__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rmatmul__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rmod__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rmod__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rmul__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rmul__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__ror__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __ror__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rpow__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rpow__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, _mod: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rrshift__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rrshift__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rshift__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rshift__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rsub__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rsub__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rtruediv__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rtruediv__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__rxor__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __rxor__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__set__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __set__( self, _py: Python<'_>, _slf: *mut PyObject, _attr: *mut PyObject, _value: NonNull<PyObject>, ) -> PyResult<()>

Safety: _slf and _attr must be valid non-null Python objects Read more
Source§

impl<T> PyClass__setattr__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __setattr__( self, _py: Python<'_>, _slf: *mut PyObject, _attr: *mut PyObject, _value: NonNull<PyObject>, ) -> PyResult<()>

Safety: _slf and _attr must be valid non-null Python objects Read more
Source§

impl<T> PyClass__setitem__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __setitem__( self, _py: Python<'_>, _slf: *mut PyObject, _attr: *mut PyObject, _value: NonNull<PyObject>, ) -> PyResult<()>

Safety: _slf and _attr must be valid non-null Python objects Read more
Source§

impl<T> PyClass__sub__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __sub__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__truediv__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __truediv__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl<T> PyClass__xor__SlotFragment<T> for &PyClassImplCollector<T>

Source§

unsafe fn __xor__( self, py: Python<'_>, _slf: *mut PyObject, _other: *mut PyObject, ) -> PyResult<*mut PyObject>

Safety: _slf and _other must be valid non-null Python objects Read more
Source§

impl PyMethods<Coroutine> for PyClassImplCollector<Coroutine>

Available on crate feature experimental-async only.
Source§

fn py_methods(self) -> &'static PyClassItems

Available on non-crate feature multiple-pymethods only.
Source§

impl<T> PyMethods<T> for &PyClassImplCollector<T>

Available on non-crate feature multiple-pymethods only.
Source§

fn py_methods(self) -> &'static PyClassItems

Source§

impl<T> Copy for PyClassImplCollector<T>

Auto Trait Implementations§

§

impl<T> Freeze for PyClassImplCollector<T>

§

impl<T> RefUnwindSafe for PyClassImplCollector<T>
where T: RefUnwindSafe,

§

impl<T> Send for PyClassImplCollector<T>
where T: Send,

§

impl<T> Sync for PyClassImplCollector<T>
where T: Sync,

§

impl<T> Unpin for PyClassImplCollector<T>
where T: Unpin,

§

impl<T> UnwindSafe for PyClassImplCollector<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AssertNotZeroSized for T

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> SizedTypeProperties for T

Source§

#[doc(hidden)] const IS_ZST: bool = _

🔬This is a nightly-only experimental API. (sized_type_properties)
true if this type requires no storage. false if its size is greater than zero. Read more
Source§

#[doc(hidden)] const LAYOUT: Layout = _

🔬This is a nightly-only experimental API. (sized_type_properties)
Source§

impl<T> SomeWrap<T> for T

Source§

fn wrap(self) -> Option<T>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> PyClassSync for T
where T: Sync,

Source§

impl<T> Ungil for T
where T: Send,

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here