Trait pythonize::PythonizeMappingType
source · 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
Object Safety§
This trait is not object safe.