Struct pyo3::PyType[][src]

pub struct PyType(_);

Represents a reference to a Python type object.

Methods

impl PyType
[src]

Retrieves the underlying FFI pointer associated with this Python object.

Retrieves the PyType instance for the given FFI pointer. This increments the reference count on the type object. Undefined behavior if the pointer is NULL or invalid.

Gets the name of the PyType.

Check whether self is subclass of type T like Python issubclass function

Trait Implementations

impl<'a> From<&'a PyType> for &'a PyObjectRef
[src]

Performs the conversion.

impl AsRef<PyObjectRef> for PyType
[src]

Performs the conversion.

impl PyObjectWithToken for PyType
[src]

impl ToPyPointer for PyType
[src]

Gets the underlying FFI pointer, returns a borrowed pointer.

impl PartialEq for PyType
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PyTypeInfo for PyType
[src]

Type of objects to store in PyObject struct

Base class

NAME: &'static str = "PyType"

Class name

SIZE: usize = ::std::mem::size_of::<::ffi::PyObject>()

Size of the rust PyObject structure (PyObject + rust structure)

OFFSET: isize = 0

Type instance offset inside PyObject structure

PyTypeObject instance for this type

Check if *mut ffi::PyObject is instance of this type

DESCRIPTION: &'static str = "\u{0}"

Class doc string

FLAGS: usize = 0

Type flags (ie PY_TYPE_FLAG_GC, PY_TYPE_FLAG_WEAKREF)

Check if *mut ffi::PyObject is exact instance of this type

impl PyTypeObject for PyType
[src]

Initialize type object

Retrieves the type object for this Python object type.

Create PyRawObject which can be initialized with rust value

impl ToPyObject for PyType
[src]

Converts self into a Python object.

impl ToBorrowedObject for PyType
[src]

Converts self into a Python object and calls the specified closure on the native FFI pointer underlying the Python object. Read more

impl Debug for PyType
[src]

Formats the value using the given formatter. Read more

impl Display for PyType
[src]

Formats the value using the given formatter. Read more

impl<'a> FromPyObject<'a> for &'a PyType
[src]

Extracts Self from the source PyObject.

Auto Trait Implementations

impl Send for PyType

impl Sync for PyType