pub trait PythonizeMappingType<'py> {
type Builder;
// Required methods
fn builder(py: Python<'py>, len: Option<usize>) -> PyResult<Self::Builder>;
fn push_item(
builder: &mut Self::Builder,
key: Bound<'py, PyAny>,
value: Bound<'py, PyAny>,
) -> PyResult<()>;
fn finish(builder: Self::Builder) -> PyResult<Bound<'py, PyMapping>>;
}
Expand description
Trait for types which can represent a Python mapping
Required Associated Types§
Required Methods§
Sourcefn builder(py: Python<'py>, len: Option<usize>) -> PyResult<Self::Builder>
fn builder(py: Python<'py>, len: Option<usize>) -> PyResult<Self::Builder>
Create a builder for a Python mapping
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.