Skip to main content

IntoPython

Trait IntoPython 

Source
pub trait IntoPython {
    // Required method
    fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>;
}
Expand description

Trait for converting Rust types to Python objects

Required Methods§

Source

fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>

Implementations on Foreign Types§

Source§

impl IntoPython for &str

Source§

fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>

Source§

impl IntoPython for bool

Source§

fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>

Source§

impl IntoPython for f32

Source§

fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>

Source§

impl IntoPython for f64

Source§

fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>

Source§

impl IntoPython for i32

Source§

fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>

Source§

impl IntoPython for i64

Source§

fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>

Source§

impl IntoPython for String

Source§

fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>

Source§

impl<K, V> IntoPython for HashMap<K, V>
where K: IntoPy<Py<PyAny>> + Hash + Eq, V: IntoPy<Py<PyAny>>,

Source§

fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>

Source§

impl<T> IntoPython for Option<T>
where T: IntoPython,

Source§

fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>

Source§

impl<T> IntoPython for Vec<T>
where T: IntoPy<Py<PyAny>> + Clone,

Source§

fn into_python(self, py: Python<'_>) -> PyResult<Py<PyAny>>

Implementors§