pub trait PythonizeMappingType {
type Builder<'py>: 'py;
// Required methods
fn builder<'py>(
py: Python<'py>,
len: Option<usize>,
) -> PyResult<Self::Builder<'py>>;
fn push_item<'py>(
builder: &mut Self::Builder<'py>,
key: Bound<'py, PyAny>,
value: Bound<'py, PyAny>,
) -> PyResult<()>;
fn finish<'py>(
builder: Self::Builder<'py>,
) -> PyResult<Bound<'py, PyMapping>>;
}Expand description
Trait for types which can represent a Python mapping
Required Associated Types§
Required Methods§
Sourcefn builder<'py>(
py: Python<'py>,
len: Option<usize>,
) -> PyResult<Self::Builder<'py>>
fn builder<'py>( py: Python<'py>, len: Option<usize>, ) -> PyResult<Self::Builder<'py>>
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.