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