Trait BoundObject
pub trait BoundObject<'py, T>: Sealed {
type Any: BoundObject<'py, PyAny>;
// Required methods
fn as_borrowed(&self) -> Borrowed<'_, 'py, T>;
fn into_bound(self) -> Bound<'py, T>;
fn into_any(self) -> Self::Any;
fn into_ptr(self) -> *mut PyObject;
fn as_ptr(&self) -> *mut PyObject;
fn unbind(self) -> Py<T>;
}
Available on crate features
dep_pyo3
and std
only.Expand description
Required Associated Types§
type Any: BoundObject<'py, PyAny>
type Any: BoundObject<'py, PyAny>
Type erased version of Self
Required Methods§
fn as_borrowed(&self) -> Borrowed<'_, 'py, T>
fn as_borrowed(&self) -> Borrowed<'_, 'py, T>
Borrow this smart pointer.
fn into_bound(self) -> Bound<'py, T>
fn into_bound(self) -> Bound<'py, T>
Turns this smart pointer into an owned [Bound<'py, T>
]