pub struct PythonizeUnnamedMappingAdapter<T: PythonizeMappingType> { /* private fields */ }Expand description
Adapter type to use an unnamed mapping type, i.e. one that implements
PythonizeMappingType, as a named mapping type, i.e. one that implements
PythonizeNamedMappingType. The adapter simply drops the provided name.
This adapter is commonly applied to use the same unnamed mapping type for
both PythonizeTypes::Map and PythonizeTypes::NamedMap while only
implementing PythonizeMappingType.
Trait Implementations§
Source§impl<T: PythonizeMappingType> PythonizeNamedMappingType for PythonizeUnnamedMappingAdapter<T>
impl<T: PythonizeMappingType> PythonizeNamedMappingType for PythonizeUnnamedMappingAdapter<T>
Source§type Builder<'py> = <T as PythonizeMappingType>::Builder<'py>
type Builder<'py> = <T as PythonizeMappingType>::Builder<'py>
Builder type for Python mappings with a name
Source§fn 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
Auto Trait Implementations§
impl<T> Freeze for PythonizeUnnamedMappingAdapter<T>where
T: Freeze,
impl<T> RefUnwindSafe for PythonizeUnnamedMappingAdapter<T>where
T: RefUnwindSafe,
impl<T> Send for PythonizeUnnamedMappingAdapter<T>where
T: Send,
impl<T> Sync for PythonizeUnnamedMappingAdapter<T>where
T: Sync,
impl<T> Unpin for PythonizeUnnamedMappingAdapter<T>where
T: Unpin,
impl<T> UnwindSafe for PythonizeUnnamedMappingAdapter<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more