pub trait PythonizeListType: Sized {
    // Required method
    fn create_sequence<T, U>(
        py: Python<'_>,
        elements: impl IntoIterator<Item = T, IntoIter = U>
    ) -> PyResult<Bound<'_, PySequence>>
       where T: ToPyObject,
             U: ExactSizeIterator<Item = T>;
}
Expand description

Trait for types which can represent a Python sequence

Required Methods§

source

fn create_sequence<T, U>( py: Python<'_>, elements: impl IntoIterator<Item = T, IntoIter = U> ) -> PyResult<Bound<'_, PySequence>>
where T: ToPyObject, U: ExactSizeIterator<Item = T>,

Constructor

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl PythonizeListType for PyList

source§

fn create_sequence<T, U>( py: Python<'_>, elements: impl IntoIterator<Item = T, IntoIter = U> ) -> PyResult<Bound<'_, PySequence>>
where T: ToPyObject, U: ExactSizeIterator<Item = T>,

Implementors§