[][src]Trait pyo3::conversion::FromPyPointer

pub unsafe trait FromPyPointer<'p>: Sized {
    unsafe fn from_owned_ptr_or_opt(
        py: Python<'p>,
        ptr: *mut PyObject
    ) -> Option<&'p Self>;
unsafe fn from_borrowed_ptr_or_opt(
        py: Python<'p>,
        ptr: *mut PyObject
    ) -> Option<&'p Self>; unsafe fn from_owned_ptr_or_panic(
        py: Python<'p>,
        ptr: *mut PyObject
    ) -> &'p Self { ... }
unsafe fn from_owned_ptr(py: Python<'p>, ptr: *mut PyObject) -> &'p Self { ... }
unsafe fn from_owned_ptr_or_err(
        py: Python<'p>,
        ptr: *mut PyObject
    ) -> PyResult<&'p Self> { ... }
unsafe fn from_borrowed_ptr_or_panic(
        py: Python<'p>,
        ptr: *mut PyObject
    ) -> &'p Self { ... }
unsafe fn from_borrowed_ptr(py: Python<'p>, ptr: *mut PyObject) -> &'p Self { ... }
unsafe fn from_borrowed_ptr_or_err(
        py: Python<'p>,
        ptr: *mut PyObject
    ) -> PyResult<&'p Self> { ... } }

Raw level conversion between *mut ffi::PyObject and PyO3 types.

Required methods

unsafe fn from_owned_ptr_or_opt(
    py: Python<'p>,
    ptr: *mut PyObject
) -> Option<&'p Self>

unsafe fn from_borrowed_ptr_or_opt(
    py: Python<'p>,
    ptr: *mut PyObject
) -> Option<&'p Self>

Loading content...

Provided methods

unsafe fn from_owned_ptr_or_panic(
    py: Python<'p>,
    ptr: *mut PyObject
) -> &'p Self

unsafe fn from_owned_ptr(py: Python<'p>, ptr: *mut PyObject) -> &'p Self

unsafe fn from_owned_ptr_or_err(
    py: Python<'p>,
    ptr: *mut PyObject
) -> PyResult<&'p Self>

unsafe fn from_borrowed_ptr_or_panic(
    py: Python<'p>,
    ptr: *mut PyObject
) -> &'p Self

unsafe fn from_borrowed_ptr(py: Python<'p>, ptr: *mut PyObject) -> &'p Self

unsafe fn from_borrowed_ptr_or_err(
    py: Python<'p>,
    ptr: *mut PyObject
) -> PyResult<&'p Self>

Loading content...

Implementors

impl<'p, T> FromPyPointer<'p> for T where
    T: 'p + PyNativeType
[src]

Loading content...