Struct cpython::PyType [] [src]

pub struct PyType(_);

Represents a reference to a Python type object.

Methods

impl PyType
[src]

[src]

Retrieves the underlying FFI pointer associated with this Python object.

[src]

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.

[src]

Gets the name of the PyType.

[src]

Return true if self is a subtype of b.

[src]

Return true if obj is an instance of self.

[src]

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.

[src]

Converts self into a Python object.

[src]

Converts self into a Python object. Read more

[src]

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]

[src]

Extracts Self from the source PyObject.

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

[src]

Extracts Self from the source PyObject.

impl PythonObject for PyType
[src]

[src]

Casts the Python object to PyObject.

[src]

Casts the Python object to PyObject.

[src]

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

[src]

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

impl PythonObjectWithCheckedDowncast for PyType
[src]

[src]

Cast from PyObject to a concrete Python object type.

[src]

Cast from PyObject to a concrete Python object type.

impl PythonObjectWithTypeObject for PyType
[src]

[src]

Retrieves the type object for this Python object type.

impl PartialEq for PyType
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl Eq for PyType
[src]