#[repr(C)]
pub struct PyTypeObject {
Show 49 fields pub ob_base: PyVarObject, pub tp_name: *const i8, pub tp_basicsize: isize, pub tp_itemsize: isize, pub tp_dealloc: Option<unsafe extern "C" fn(*mut PyObject)>, pub tp_vectorcall_offset: isize, pub tp_getattr: Option<unsafe extern "C" fn(*mut PyObject, *mut i8) -> *mut PyObject>, pub tp_setattr: Option<unsafe extern "C" fn(*mut PyObject, *mut i8, *mut PyObject) -> i32>, pub tp_as_async: *mut PyAsyncMethods, pub tp_repr: Option<unsafe extern "C" fn(*mut PyObject) -> *mut PyObject>, pub tp_as_number: *mut PyNumberMethods, pub tp_as_sequence: *mut PySequenceMethods, pub tp_as_mapping: *mut PyMappingMethods, pub tp_hash: Option<unsafe extern "C" fn(*mut PyObject) -> isize>, pub tp_call: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, *mut PyObject) -> *mut PyObject>, pub tp_str: Option<unsafe extern "C" fn(*mut PyObject) -> *mut PyObject>, pub tp_getattro: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject) -> *mut PyObject>, pub tp_setattro: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, *mut PyObject) -> i32>, pub tp_as_buffer: *mut PyBufferProcs, pub tp_flags: u64, pub tp_doc: *const i8, pub tp_traverse: Option<unsafe extern "C" fn(*mut PyObject, unsafe extern "C" fn(*mut PyObject, *mut c_void) -> i32, *mut c_void) -> i32>, pub tp_clear: Option<unsafe extern "C" fn(*mut PyObject) -> i32>, pub tp_richcompare: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, i32) -> *mut PyObject>, pub tp_weaklistoffset: isize, pub tp_iter: Option<unsafe extern "C" fn(*mut PyObject) -> *mut PyObject>, pub tp_iternext: Option<unsafe extern "C" fn(*mut PyObject) -> *mut PyObject>, pub tp_methods: *mut PyMethodDef, pub tp_members: *mut PyMemberDef, pub tp_getset: *mut PyGetSetDef, pub tp_base: *mut PyTypeObject, pub tp_dict: *mut PyObject, pub tp_descr_get: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, *mut PyObject) -> *mut PyObject>, pub tp_descr_set: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, *mut PyObject) -> i32>, pub tp_dictoffset: isize, pub tp_init: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, *mut PyObject) -> i32>, pub tp_alloc: Option<unsafe extern "C" fn(*mut PyTypeObject, isize) -> *mut PyObject>, pub tp_new: Option<unsafe extern "C" fn(*mut PyTypeObject, *mut PyObject, *mut PyObject) -> *mut PyObject>, pub tp_free: Option<unsafe extern "C" fn(*mut c_void)>, pub tp_is_gc: Option<unsafe extern "C" fn(*mut PyObject) -> i32>, pub tp_bases: *mut PyObject, pub tp_mro: *mut PyObject, pub tp_cache: *mut PyObject, pub tp_subclasses: *mut PyObject, pub tp_weaklist: *mut PyObject, pub tp_del: Option<unsafe extern "C" fn(*mut PyObject)>, pub tp_version_tag: u32, pub tp_finalize: Option<unsafe extern "C" fn(*mut PyObject)>, pub tp_vectorcall: Option<unsafe extern "C" fn(*mut PyObject, *const *mut PyObject, usize, *mut PyObject) -> *mut PyObject>,
}

Fields

ob_base: PyVarObject
Available on non-PyPy only.
tp_name: *const i8tp_basicsize: isizetp_itemsize: isizetp_dealloc: Option<unsafe extern "C" fn(*mut PyObject)>tp_vectorcall_offset: isize
Available on Py_3_8 only.
tp_getattr: Option<unsafe extern "C" fn(*mut PyObject, *mut i8) -> *mut PyObject>tp_setattr: Option<unsafe extern "C" fn(*mut PyObject, *mut i8, *mut PyObject) -> i32>tp_as_async: *mut PyAsyncMethodstp_repr: Option<unsafe extern "C" fn(*mut PyObject) -> *mut PyObject>tp_as_number: *mut PyNumberMethodstp_as_sequence: *mut PySequenceMethodstp_as_mapping: *mut PyMappingMethodstp_hash: Option<unsafe extern "C" fn(*mut PyObject) -> isize>tp_call: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, *mut PyObject) -> *mut PyObject>tp_str: Option<unsafe extern "C" fn(*mut PyObject) -> *mut PyObject>tp_getattro: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject) -> *mut PyObject>tp_setattro: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, *mut PyObject) -> i32>tp_as_buffer: *mut PyBufferProcstp_flags: u64tp_doc: *const i8tp_traverse: Option<unsafe extern "C" fn(*mut PyObject, unsafe extern "C" fn(*mut PyObject, *mut c_void) -> i32, *mut c_void) -> i32>tp_clear: Option<unsafe extern "C" fn(*mut PyObject) -> i32>tp_richcompare: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, i32) -> *mut PyObject>tp_weaklistoffset: isizetp_iter: Option<unsafe extern "C" fn(*mut PyObject) -> *mut PyObject>tp_iternext: Option<unsafe extern "C" fn(*mut PyObject) -> *mut PyObject>tp_methods: *mut PyMethodDeftp_members: *mut PyMemberDeftp_getset: *mut PyGetSetDeftp_base: *mut PyTypeObjecttp_dict: *mut PyObjecttp_descr_get: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, *mut PyObject) -> *mut PyObject>tp_descr_set: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, *mut PyObject) -> i32>tp_dictoffset: isizetp_init: Option<unsafe extern "C" fn(*mut PyObject, *mut PyObject, *mut PyObject) -> i32>tp_alloc: Option<unsafe extern "C" fn(*mut PyTypeObject, isize) -> *mut PyObject>tp_new: Option<unsafe extern "C" fn(*mut PyTypeObject, *mut PyObject, *mut PyObject) -> *mut PyObject>tp_free: Option<unsafe extern "C" fn(*mut c_void)>tp_is_gc: Option<unsafe extern "C" fn(*mut PyObject) -> i32>tp_bases: *mut PyObjecttp_mro: *mut PyObjecttp_cache: *mut PyObjecttp_subclasses: *mut PyObjecttp_weaklist: *mut PyObjecttp_del: Option<unsafe extern "C" fn(*mut PyObject)>tp_version_tag: u32tp_finalize: Option<unsafe extern "C" fn(*mut PyObject)>tp_vectorcall: Option<unsafe extern "C" fn(*mut PyObject, *const *mut PyObject, usize, *mut PyObject) -> *mut PyObject>
Available on Py_3_8 only.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.