Struct cpython::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.

Return true if self is a subtype of b.

Return true if obj is an instance of self.

Calls the type object, thus creating a new instance. This is equivalent to the Python expression: self(*args, **kwargs)

Trait Implementations

impl ToPyObject for PyType
[src]

Identity conversion: allows using existing PyObject instances where T: ToPyObject is expected.

Converts self into a Python object.

Converts self into a Python object. Read more

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

impl<'source> FromPyObject<'source> for PyType
[src]

Extracts Self from the source PyObject.

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

Extracts Self from the source PyObject.

impl PythonObject for PyType
[src]

Casts the Python object to PyObject.

Casts the Python object to PyObject.

Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.

Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.

impl PythonObjectWithCheckedDowncast for PyType
[src]

Cast from PyObject to a concrete Python object type.

Cast from PyObject to a concrete Python object type.

impl PythonObjectWithTypeObject for PyType
[src]

Retrieves the type object for this Python object type.

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 Eq for PyType
[src]