[−][src]Struct pyo3::types::PyObjectRef
Represents general python instance.
Trait Implementations
impl ToPyObject for PyObjectRef
[src]
impl<U> PyTryInto<U> for PyObjectRef where
U: PyTryFrom,
[src]
U: PyTryFrom,
type Error = PyDowncastError
The type returned in the event of a conversion error.
fn try_into(&self) -> Result<&U, PyDowncastError>
[src]
fn try_into_exact(&self) -> Result<&U, PyDowncastError>
[src]
fn try_into_mut(&self) -> Result<&mut U, PyDowncastError>
[src]
fn try_into_mut_exact(&self) -> Result<&mut U, PyDowncastError>
[src]
impl PyObjectWithToken for PyObjectRef
[src]
impl AsPyRef<PyObjectRef> for PyObject
[src]
fn as_ref(&self, _py: Python) -> &PyObjectRef
[src]
fn as_mut(&mut self, _py: Python) -> &mut PyObjectRef
[src]
fn with<F, R>(&self, f: F) -> R where
F: FnOnce(Python, &T) -> R,
[src]
F: FnOnce(Python, &T) -> R,
Acquire python gil and call closure with object reference.
fn with_mut<F, R>(&mut self, f: F) -> R where
F: FnOnce(Python, &mut T) -> R,
[src]
F: FnOnce(Python, &mut T) -> R,
Acquire python gil and call closure with mutable object reference.
fn into_py<F, R>(self, f: F) -> R where
Self: IntoPyPointer,
F: FnOnce(Python, &T) -> R,
[src]
Self: IntoPyPointer,
F: FnOnce(Python, &T) -> R,
fn into_mut_py<F, R>(self, f: F) -> R where
Self: IntoPyPointer,
F: FnOnce(Python, &mut T) -> R,
[src]
Self: IntoPyPointer,
F: FnOnce(Python, &mut T) -> R,
impl ToPyPointer for PyObjectRef
[src]
impl PyTypeInfo for PyObjectRef
[src]
type Type = ()
Type of objects to store in PyObject struct
type BaseType = PyObjectRef
Base class
const NAME: &'static str
[src]
const SIZE: usize
[src]
const OFFSET: isize
[src]
unsafe fn type_object() -> &'static mut PyTypeObject
[src]
fn is_instance(ptr: &PyObjectRef) -> bool
[src]
const DESCRIPTION: &'static str
[src]
Class doc string
const FLAGS: usize
[src]
Type flags (ie PY_TYPE_FLAG_GC, PY_TYPE_FLAG_WEAKREF)
fn is_exact_instance(object: &PyObjectRef) -> bool
[src]
Check if *mut ffi::PyObject
is exact instance of this type
impl PyTypeCreate for PyObjectRef
[src]
fn init_type()
[src]
fn type_object() -> Py<PyType>
[src]
#[must_use]
fn create(py: Python) -> PyResult<PyRawObject>
[src]
#[must_use]
fn create(py: Python) -> PyResult<PyRawObject>Create PyRawObject which can be initialized with rust value
impl<'a> From<&'a PyBool> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyByteArray> for &'a PyObjectRef
[src]
fn from(ob: &'a PyByteArray) -> Self
[src]
impl<'a> From<&'a PyComplex> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyDate> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyDateTime> for &'a PyObjectRef
[src]
fn from(ob: &'a PyDateTime) -> Self
[src]
impl<'a> From<&'a PyTime> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyTzInfo> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyDelta> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyDict> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyFloat> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyList> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyModule> for &'a PyObjectRef
[src]
impl<'a> From<&'a PySet> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyFrozenSet> for &'a PyObjectRef
[src]
fn from(ob: &'a PyFrozenSet) -> Self
[src]
impl<'a> From<&'a PySlice> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyTuple> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyType> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyLong> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyString> for &'a PyObjectRef
[src]
impl<'a> From<&'a PyBytes> for &'a PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyObjectRef
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyBool
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyByteArray
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyComplex
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyDate
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyDateTime
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyTime
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyTzInfo
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyDelta
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyDict
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyFloat
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyList
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyModule
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PySequence
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PySet
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyFrozenSet
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PySlice
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyTuple
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyType
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyLong
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyString
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl AsRef<PyObjectRef> for PyBytes
[src]
fn as_ref(&self) -> &PyObjectRef
[src]
impl PartialEq<PyObjectRef> for PyObjectRef
[src]
fn eq(&self, o: &PyObjectRef) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=
.
impl Debug for PyObjectRef
[src]
impl Display for PyObjectRef
[src]
Auto Trait Implementations
impl Send for PyObjectRef
impl Sync for PyObjectRef
Blanket Implementations
impl<T> PyObjectAlloc for T where
T: PyObjectWithFreeList,
[src]
T: PyObjectWithFreeList,
unsafe fn alloc(Python) -> Result<*mut PyObject, PyErr>
[src]
unsafe fn dealloc(Python, *mut PyObject)
[src]
unsafe fn drop(_py: Python, _obj: *mut PyObject)
[src]
Calls the rust destructor for the object.
impl<T> PyObjectAlloc for T where
T: PyTypeInfo,
[src]
T: PyTypeInfo,
unsafe fn drop(Python, *mut PyObject)
[src]
Calls the rust destructor for the object.
unsafe fn alloc(Python) -> Result<*mut PyObject, PyErr>
[src]
unsafe fn dealloc(Python, *mut PyObject)
[src]
impl<T> PyTypeObject for T where
T: PyTypeCreate,
[src]
T: PyTypeCreate,
impl<T> PyTypeCreate for T where
T: PyObjectAlloc<T> + PyTypeInfo,
[src]
T: PyObjectAlloc<T> + PyTypeInfo,
fn init_type()
[src]
fn type_object() -> Py<PyType>
[src]
#[must_use]
fn create(py: Python) -> PyResult<PyRawObject>
[src]
#[must_use]
fn create(py: Python) -> PyResult<PyRawObject>Create PyRawObject which can be initialized with rust value
impl<T> From for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,