#[repr(C)]pub struct PyTypeObject {Show 51 fields
pub ob_base: PyVarObject,
pub tp_name: *const c_char,
pub tp_basicsize: Py_ssize_t,
pub tp_itemsize: Py_ssize_t,
pub tp_dealloc: Option<destructor>,
pub tp_vectorcall_offset: Py_ssize_t,
pub tp_getattr: Option<getattrfunc>,
pub tp_setattr: Option<setattrfunc>,
pub tp_as_async: *mut PyAsyncMethods,
pub tp_repr: Option<reprfunc>,
pub tp_as_number: *mut PyNumberMethods,
pub tp_as_sequence: *mut PySequenceMethods,
pub tp_as_mapping: *mut PyMappingMethods,
pub tp_hash: Option<hashfunc>,
pub tp_call: Option<ternaryfunc>,
pub tp_str: Option<reprfunc>,
pub tp_getattro: Option<getattrofunc>,
pub tp_setattro: Option<setattrofunc>,
pub tp_as_buffer: *mut PyBufferProcs,
pub tp_flags: c_ulong,
pub tp_doc: *const c_char,
pub tp_traverse: Option<traverseproc>,
pub tp_clear: Option<inquiry>,
pub tp_richcompare: Option<richcmpfunc>,
pub tp_weaklistoffset: Py_ssize_t,
pub tp_iter: Option<getiterfunc>,
pub tp_iternext: Option<iternextfunc>,
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<descrgetfunc>,
pub tp_descr_set: Option<descrsetfunc>,
pub tp_dictoffset: Py_ssize_t,
pub tp_init: Option<initproc>,
pub tp_alloc: Option<allocfunc>,
pub tp_new: Option<newfunc>,
pub tp_free: Option<freefunc>,
pub tp_is_gc: Option<inquiry>,
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<destructor>,
pub tp_version_tag: c_uint,
pub tp_finalize: Option<destructor>,
pub tp_vectorcall: Option<vectorcallfunc>,
pub tp_watched: c_char,
pub tp_versions_used: u16,
}Available on neither
Py_LIMITED_API nor RustPython.Fields§
§ob_base: PyVarObject§tp_name: *const c_char§tp_basicsize: Py_ssize_t§tp_itemsize: Py_ssize_t§tp_dealloc: Option<destructor>§tp_vectorcall_offset: Py_ssize_t§tp_getattr: Option<getattrfunc>§tp_setattr: Option<setattrfunc>§tp_as_async: *mut PyAsyncMethods§tp_repr: Option<reprfunc>§tp_as_number: *mut PyNumberMethods§tp_as_sequence: *mut PySequenceMethods§tp_as_mapping: *mut PyMappingMethods§tp_hash: Option<hashfunc>§tp_call: Option<ternaryfunc>§tp_str: Option<reprfunc>§tp_getattro: Option<getattrofunc>§tp_setattro: Option<setattrofunc>§tp_as_buffer: *mut PyBufferProcs§tp_flags: c_ulongAvailable on non-
§Py_GIL_DISABLED only.tp_doc: *const c_char§tp_traverse: Option<traverseproc>§tp_clear: Option<inquiry>§tp_richcompare: Option<richcmpfunc>§tp_weaklistoffset: Py_ssize_t§tp_iter: Option<getiterfunc>§tp_iternext: Option<iternextfunc>§tp_methods: *mut PyMethodDef§tp_members: *mut PyMemberDef§tp_getset: *mut PyGetSetDef§tp_base: *mut PyTypeObject§tp_dict: *mut PyObject§tp_descr_get: Option<descrgetfunc>§tp_descr_set: Option<descrsetfunc>§tp_dictoffset: Py_ssize_t§tp_init: Option<initproc>§tp_alloc: Option<allocfunc>§tp_new: Option<newfunc>§tp_free: Option<freefunc>§tp_is_gc: Option<inquiry>§tp_bases: *mut PyObject§tp_mro: *mut PyObject§tp_cache: *mut PyObject§tp_subclasses: *mut PyObject§tp_weaklist: *mut PyObject§tp_del: Option<destructor>§tp_version_tag: c_uint§tp_finalize: Option<destructor>§tp_vectorcall: Option<vectorcallfunc>§tp_watched: c_charAvailable on
§Py_3_12 only.tp_versions_used: u16Available on
Py_3_13 only.Trait Implementations§
Auto Trait Implementations§
impl !Send for PyTypeObject
impl !Sync for PyTypeObject
impl Forget for PyTypeObject
impl Freeze for PyTypeObjectwhere
*mut PyTypeObject: Freeze,
*const i8: Freeze,
*mut PyAsyncMethods: Freeze,
*mut PyNumberMethods: Freeze,
*mut PySequenceMethods: Freeze,
*mut PyMappingMethods: Freeze,
*mut PyBufferProcs: Freeze,
*mut PyMethodDef: Freeze,
*mut PyMemberDef: Freeze,
*mut PyGetSetDef: Freeze,
*mut PyObject: Freeze,
impl Move for PyTypeObject
impl RefUnwindSafe for PyTypeObject
impl Unpin for PyTypeObjectwhere
*mut PyTypeObject: Unpin,
*const i8: Unpin,
*mut PyAsyncMethods: Unpin,
*mut PyNumberMethods: Unpin,
*mut PySequenceMethods: Unpin,
*mut PyMappingMethods: Unpin,
*mut PyBufferProcs: Unpin,
*mut PyMethodDef: Unpin,
*mut PyMemberDef: Unpin,
*mut PyGetSetDef: Unpin,
*mut PyObject: Unpin,
impl UnsafeUnpin for PyTypeObjectwhere
*mut PyTypeObject: UnsafeUnpin,
*const i8: UnsafeUnpin,
*mut PyAsyncMethods: UnsafeUnpin,
*mut PyNumberMethods: UnsafeUnpin,
*mut PySequenceMethods: UnsafeUnpin,
*mut PyMappingMethods: UnsafeUnpin,
*mut PyBufferProcs: UnsafeUnpin,
*mut PyMethodDef: UnsafeUnpin,
*mut PyMemberDef: UnsafeUnpin,
*mut PyGetSetDef: UnsafeUnpin,
*mut PyObject: UnsafeUnpin,
impl UnwindSafe for PyTypeObjectwhere
*mut PyTypeObject: UnwindSafe,
*const i8: UnwindSafe,
*mut PyAsyncMethods: UnwindSafe,
*mut PyNumberMethods: UnwindSafe,
*mut PySequenceMethods: UnwindSafe,
*mut PyMappingMethods: UnwindSafe,
*mut PyBufferProcs: UnwindSafe,
*mut PyMethodDef: UnwindSafe,
*mut PyMemberDef: UnwindSafe,
*mut PyGetSetDef: UnwindSafe,
*mut PyObject: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> SizeHint for Twhere
T: ?Sized,
impl<T> SizeHint for Twhere
T: ?Sized,
Source§default fn lower_bound(&self) -> usize
default fn lower_bound(&self) -> usize
🔬This is a nightly-only experimental API. (
core_io_internals)Returns a lower bound on the number of elements this container-like item
contains.
For example, an array
[u8; 12] could return any value between 0 and
12 inclusively as a correct implementation. Read moreSource§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize
#[doc(hidden)]const SIZE: usize
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize
#[doc(hidden)]const ALIGN: usize
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment
#[doc(hidden)]const ALIGNMENT: Alignment
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const IS_ZST: bool
#[doc(hidden)]const IS_ZST: bool
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout
#[doc(hidden)]const LAYOUT: Layout
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize
#[doc(hidden)]const MAX_SLICE_LEN: usize
🔬This is a nightly-only experimental API. (
sized_type_properties)The largest safe length for a
[Self]. Read more