pub trait PythonizeNamedMappingType<'py> {
type Builder;
// Required methods
fn builder(
py: Python<'py>,
len: usize,
name: &'static str,
) -> PyResult<Self::Builder>;
fn push_field(
builder: &mut Self::Builder,
name: Bound<'py, PyString>,
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 and have a name
Required Associated Types§
Required Methods§
Sourcefn builder(
py: Python<'py>,
len: usize,
name: &'static str,
) -> PyResult<Self::Builder>
fn builder( py: Python<'py>, len: usize, name: &'static str, ) -> PyResult<Self::Builder>
Create a builder for a Python mapping with a name
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.