MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / ToPythonPointer

Interface ToPythonPointer

src/python.rs:153–159  ·  view source on GitHub ↗

This trait allows retrieving the underlying FFI pointer from Python objects.

Source from the content-addressed store, hash-verified

151
152/// This trait allows retrieving the underlying FFI pointer from Python objects.
153pub trait ToPythonPointer {
154 /// Retrieves the underlying FFI pointer (as a borrowed pointer).
155 fn as_ptr(&self) -> *mut ffi::PyObject;
156
157 /// Retrieves the underlying FFI pointer as a "stolen pointer".
158 fn steal_ptr(self, py: Python) -> *mut ffi::PyObject;
159}
160
161/// ToPythonPointer for borrowed Python pointers.
162impl ToPythonPointer for PyObject {

Callers

nothing calls this directly

Implementers 1

python.rssrc/python.rs

Calls

no outgoing calls

Tested by

no test coverage detected