pyo3::impl_

Module pyclass

Source

Re-exportsยง

pub use lazy_type_object::LazyTypeObject;
pub use generate_pyclass_getattro_slot;
pub use generate_pyclass_setattr_slot;
pub use generate_pyclass_setdescr_slot;
pub use generate_pyclass_setitem_slot;
pub use generate_pyclass_add_slot;
pub use generate_pyclass_sub_slot;
pub use generate_pyclass_mul_slot;
pub use generate_pyclass_mod_slot;
pub use generate_pyclass_divmod_slot;
pub use generate_pyclass_lshift_slot;
pub use generate_pyclass_rshift_slot;
pub use generate_pyclass_and_slot;
pub use generate_pyclass_or_slot;
pub use generate_pyclass_xor_slot;
pub use generate_pyclass_matmul_slot;
pub use generate_pyclass_truediv_slot;
pub use generate_pyclass_floordiv_slot;
pub use generate_pyclass_pow_slot;
pub use generate_pyclass_richcompare_slot;
pub use assertions::*;
pub use probes::*;

Modulesยง

assertions ๐Ÿ”’
lazy_type_object ๐Ÿ”’
probes ๐Ÿ”’
sealed ๐Ÿ”’

Macrosยง

define_pyclass_binary_operator_slot ๐Ÿ”’
Macro which expands to three items
define_pyclass_setattr_slot ๐Ÿ”’
Macro which expands to three items
offset_of
Calculates the offset of the specified field from the start of the named struct.
slot_fragment_trait ๐Ÿ”’

Structsยง

ConvertField
PyClassDictSlot
Actual dict field, which holds the pointer to __dict__.
PyClassDummySlot
Zero-sized dummy field.
PyClassGetterGenerator
Type which uses specialization on impl blocks to determine how to read a field from a Rust pyclass as part of a #[pyo3(get)] annotation.
PyClassImplCollector
This type is used as a โ€œdummyโ€ type on which dtolnay specializations are applied to apply implementations from #[pymethods]
PyClassItems
PyClassItemsIter
Iterator used to process all class items during type instantiation.
PyClassWeakRefSlot
Actual weakref field, which holds the pointer to __weakref__.
SendablePyClass ๐Ÿ‘ป
Default thread checker for #[pyclass].
ThreadCheckerImpl ๐Ÿ‘ป
Thread checker for #[pyclass(unsendable)] types. Panics when the value is accessed by another thread.

Enumsยง

MaybeRuntimePyMethodDef

Traitsยง

OffsetCalculator
Helper trait to locate field within a #[pyclass] for a #[pyo3(get)].
PyClassBaseType
Trait denoting that this class is suitable to be used as a base type for PyClass.
PyClassDict
Represents the __dict__ field for #[pyclass].
PyClassImpl
Implements the underlying functionality of #[pyclass], assembled by various proc macros.
PyClassNewTextSignature
PyClassThreadChecker ๐Ÿ‘ป
PyClassWeakRef
Represents the __weakref__ field for #[pyclass].
PyClassWithFreeList
Implements a freelist.
PyClass__add__SlotFragment
PyClass__and__SlotFragment
PyClass__delattr__SlotFragment
PyClass__delete__SlotFragment
PyClass__delitem__SlotFragment
PyClass__divmod__SlotFragment
PyClass__eq__SlotFragment
PyClass__floordiv__SlotFragment
PyClass__ge__SlotFragment
PyClass__getattr__SlotFragment
PyClass__getattribute__SlotFragment
PyClass__gt__SlotFragment
PyClass__le__SlotFragment
PyClass__lshift__SlotFragment
PyClass__lt__SlotFragment
PyClass__matmul__SlotFragment
PyClass__mod__SlotFragment
PyClass__mul__SlotFragment
PyClass__ne__SlotFragment
PyClass__or__SlotFragment
PyClass__pow__SlotFragment
PyClass__radd__SlotFragment
PyClass__rand__SlotFragment
PyClass__rdivmod__SlotFragment
PyClass__rfloordiv__SlotFragment
PyClass__rlshift__SlotFragment
PyClass__rmatmul__SlotFragment
PyClass__rmod__SlotFragment
PyClass__rmul__SlotFragment
PyClass__ror__SlotFragment
PyClass__rpow__SlotFragment
PyClass__rrshift__SlotFragment
PyClass__rshift__SlotFragment
PyClass__rsub__SlotFragment
PyClass__rtruediv__SlotFragment
PyClass__rxor__SlotFragment
PyClass__set__SlotFragment
PyClass__setattr__SlotFragment
PyClass__setitem__SlotFragment
PyClass__sub__SlotFragment
PyClass__truediv__SlotFragment
PyClass__xor__SlotFragment
PyMethodsNon-multiple-pymethods
PyO3GetField

Functionsยง

alloc_with_freelistโš 
Implementation of tp_alloc for freelist classes.
assign_sequence_item_from_mapping ๐Ÿ”’ โš 
build_pyclass_doc
Runtime helper to build a class docstring from the doc and text_signature.
class_offset
dict_offset
Gets the offset of the dictionary from the start of the object in bytes.
ensure_no_mutable_alias ๐Ÿ”’ โš 
ensures obj is not mutably aliased
field_from_object ๐Ÿ”’
calculates the field pointer from an PyObject pointer
free_with_freelistโš 
Implementation of tp_free for freelist classes.
get_sequence_item_from_mapping ๐Ÿ”’ โš 
pyo3_get_value ๐Ÿ”’
pyo3_get_value_into_pyobject ๐Ÿ”’
pyo3_get_value_into_pyobject_ref ๐Ÿ”’
pyo3_get_value_topyobject ๐Ÿ”’
tp_dealloc ๐Ÿ”’ โš 
Implementation of tp_dealloc for pyclasses without gc
tp_dealloc_with_gc ๐Ÿ”’ โš 
Implementation of tp_dealloc for pyclasses with gc
weaklist_offset
Gets the offset of the weakref list from the start of the object in bytes.
โš ๏ธ Internal Docs โš ๏ธ Not Public API ๐Ÿ‘‰ Official Docs Here