pub trait PyClassDict: Sealed {
const INIT: Self;
// Provided methods
fn clear_dict(&self, _py: Python<'_>) { ... }
fn release_dict(&mut self, _py: Python<'_>) { ... }
unsafe fn traverse_dict(
&self,
_visit: visitproc,
_arg: *mut c_void,
) -> c_int { ... }
}Expand description
Represents the __dict__ field for #[pyclass].
Required Associated Constants§
Provided Methods§
Sourcefn clear_dict(&self, _py: Python<'_>)
fn clear_dict(&self, _py: Python<'_>)
Empties the dictionary of its key-value pairs.
Sourcefn release_dict(&mut self, _py: Python<'_>)
fn release_dict(&mut self, _py: Python<'_>)
Releases the owned reference to the dictionary.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".