Trait pyo3::impl_::pyclass::PyClassDict

source ·
pub trait PyClassDict {
    const INIT: Self;

    // Required method
    fn __private__(&self) -> PrivateMarker;

    // Provided method
    fn clear_dict(&mut self, _py: Python<'_>) { ... }
}
Expand description

Represents the __dict__ field for #[pyclass].

Required Associated Constants§

source

const INIT: Self

Initial form of a PyObject __dict__ reference.

Required Methods§

source

fn __private__(&self) -> PrivateMarker

This trait is private to implement; this method exists to make it impossible to implement outside the crate.

Provided Methods§

source

fn clear_dict(&mut self, _py: Python<'_>)

Empties the dictionary of its key-value pairs.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl PyClassDict for PyClassDictSlot

source§

const INIT: Self = _

source§

impl PyClassDict for PyClassDummySlot

source§

const INIT: Self = PyClassDummySlot

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