#[repr(C)]pub struct PyTypeObject {Show 51 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>,
pub tp_watched: i8,
pub tp_versions_used: u16,
}Available on neither
Py_LIMITED_API nor RustPython.Fields§
§ob_base: PyVarObject§tp_name: *const i8§tp_basicsize: isize§tp_itemsize: isize§tp_dealloc: Option<unsafe extern "C" fn(*mut PyObject)>§tp_vectorcall_offset: isize§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 PyAsyncMethods§tp_repr: Option<unsafe extern "C" fn(*mut PyObject) -> *mut PyObject>§tp_as_number: *mut PyNumberMethods§tp_as_sequence: *mut PySequenceMethods§tp_as_mapping: *mut PyMappingMethods§tp_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 PyBufferProcs§tp_flags: u64Available on non-
§Py_GIL_DISABLED only.tp_doc: *const i8§tp_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: isize§tp_iter: Option<unsafe extern "C" fn(*mut PyObject) -> *mut PyObject>§tp_iternext: Option<unsafe extern "C" fn(*mut PyObject) -> *mut PyObject>§tp_methods: *mut PyMethodDef§tp_members: *mut PyMemberDef§tp_getset: *mut PyGetSetDef§tp_base: *mut PyTypeObject§tp_dict: *mut PyObject§tp_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: isize§tp_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 PyObject§tp_mro: *mut PyObject§tp_cache: *mut PyObject§tp_subclasses: *mut PyObject§tp_weaklist: *mut PyObject§tp_del: Option<unsafe extern "C" fn(*mut PyObject)>§tp_version_tag: u32§tp_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>§tp_watched: i8Available 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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