[][src]Trait pyo3::conversion::FromPy

pub trait FromPy<T>: Sized {
    fn from_py(_: T, py: Python<'_>) -> Self;
}

Similar to std::convert::From, just that it requires a gil token.

Required methods

fn from_py(_: T, py: Python<'_>) -> Self

Performs the conversion.

Loading content...

Implementors

impl FromPy<bool> for PyObject[src]

impl FromPy<f32> for PyObject[src]

impl FromPy<f64> for PyObject[src]

impl FromPy<()> for Py<PyTuple>[src]

Converts () to an empty Python tuple.

impl FromPy<()> for PyObject[src]

impl FromPy<PyErr> for PyObject[src]

impl FromPy<String> for PyObject[src]

impl<'a> FromPy<&'a PyTuple> for Py<PyTuple>[src]

impl<'a> FromPy<&'a [u8]> for PyObject[src]

impl<'a, T> FromPy<&'a T> for PyObject where
    T: AsPyPointer
[src]

impl<'p, T: PyClass> FromPy<PyRef<'p, T>> for PyObject[src]

impl<'p, T: PyClass> FromPy<PyRefMut<'p, T>> for PyObject[src]

impl<K> FromPy<BTreeSet<K>> for PyObject where
    K: IntoPy<PyObject> + Ord + ToPyObject
[src]

impl<K, S> FromPy<HashSet<K, S>> for PyObject where
    K: IntoPy<PyObject> + Eq + Hash,
    S: BuildHasher + Default
[src]

impl<T> FromPy<T> for T[src]

Loading content...