[][src]Trait pyo3::FromPyPointer

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

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

Loading content...

Provided methods

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

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

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

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

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

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

Loading content...

Implementations on Foreign Types

impl<'p, T> FromPyPointer<'p> for &'p T where
    T: PyTypeInfo
[src]

impl<'p, T> FromPyPointer<'p> for &'p mut T where
    T: PyTypeInfo
[src]

Loading content...

Implementors

impl<'p, T> FromPyPointer<'p> for PyRef<'p, T> where
    T: PyTypeInfo
[src]

impl<'p, T> FromPyPointer<'p> for PyRefMut<'p, T> where
    T: PyTypeInfo
[src]

Loading content...