Struct simics_api_sys::_typeobject

source ·
#[repr(C)]
pub struct _typeobject {
Show 49 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: destructor, pub tp_vectorcall_offset: Py_ssize_t, pub tp_getattr: getattrfunc, pub tp_setattr: setattrfunc, pub tp_as_async: *mut PyAsyncMethods, pub tp_repr: reprfunc, pub tp_as_number: *mut PyNumberMethods, pub tp_as_sequence: *mut PySequenceMethods, pub tp_as_mapping: *mut PyMappingMethods, pub tp_hash: hashfunc, pub tp_call: ternaryfunc, pub tp_str: reprfunc, pub tp_getattro: getattrofunc, pub tp_setattro: setattrofunc, pub tp_as_buffer: *mut PyBufferProcs, pub tp_flags: c_ulong, pub tp_doc: *const c_char, pub tp_traverse: traverseproc, pub tp_clear: inquiry, pub tp_richcompare: richcmpfunc, pub tp_weaklistoffset: Py_ssize_t, pub tp_iter: getiterfunc, pub tp_iternext: iternextfunc, pub tp_methods: *mut PyMethodDef, pub tp_members: *mut PyMemberDef, pub tp_getset: *mut PyGetSetDef, pub tp_base: *mut _typeobject, pub tp_dict: *mut PyObject, pub tp_descr_get: descrgetfunc, pub tp_descr_set: descrsetfunc, pub tp_dictoffset: Py_ssize_t, pub tp_init: initproc, pub tp_alloc: allocfunc, pub tp_new: newfunc, pub tp_free: freefunc, pub tp_is_gc: 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: destructor, pub tp_version_tag: c_uint, pub tp_finalize: destructor, pub tp_vectorcall: vectorcallfunc,
}
Expand description

If this structure is modified, Doc/includes/typestruct.h should be updated as well.

Fields§

§ob_base: PyVarObject§tp_name: *const c_char

For printing, in format “.

§tp_basicsize: Py_ssize_t

For allocation

§tp_itemsize: Py_ssize_t

For allocation

§tp_dealloc: destructor

Methods to implement standard operations

§tp_vectorcall_offset: Py_ssize_t§tp_getattr: getattrfunc§tp_setattr: setattrfunc§tp_as_async: *mut PyAsyncMethods

formerly known as tp_compare (Python 2) or tp_reserved (Python 3)

§tp_repr: reprfunc§tp_as_number: *mut PyNumberMethods

Method suites for standard classes

§tp_as_sequence: *mut PySequenceMethods§tp_as_mapping: *mut PyMappingMethods§tp_hash: hashfunc

More standard operations (here for binary compatibility)

§tp_call: ternaryfunc§tp_str: reprfunc§tp_getattro: getattrofunc§tp_setattro: setattrofunc§tp_as_buffer: *mut PyBufferProcs

Functions to access object as input/output buffer

§tp_flags: c_ulong

Flags to define presence of optional/expanded features

§tp_doc: *const c_char

Documentation string

§tp_traverse: traverseproc

Assigned meaning in release 2.0 / / call function for all accessible objects

§tp_clear: inquiry

delete references to contained objects

§tp_richcompare: richcmpfunc

Assigned meaning in release 2.1 / / rich comparisons

§tp_weaklistoffset: Py_ssize_t

weak reference enabler

§tp_iter: getiterfunc

Iterators

§tp_iternext: iternextfunc§tp_methods: *mut PyMethodDef

Attribute descriptor and subclassing stuff

§tp_members: *mut PyMemberDef§tp_getset: *mut PyGetSetDef§tp_base: *mut _typeobject

Strong reference on a heap type, borrowed reference on a static type

§tp_dict: *mut PyObject§tp_descr_get: descrgetfunc§tp_descr_set: descrsetfunc§tp_dictoffset: Py_ssize_t§tp_init: initproc§tp_alloc: allocfunc§tp_new: newfunc§tp_free: freefunc

Low-level free-memory routine

§tp_is_gc: inquiry

For PyObject_IS_GC

§tp_bases: *mut PyObject§tp_mro: *mut PyObject

method resolution order

§tp_cache: *mut PyObject§tp_subclasses: *mut PyObject§tp_weaklist: *mut PyObject§tp_del: destructor§tp_version_tag: c_uint

Type attribute cache version tag. Added in version 2.6

§tp_finalize: destructor§tp_vectorcall: vectorcallfunc

Trait Implementations§

source§

impl Clone for _typeobject

source§

fn clone(&self) -> _typeobject

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for _typeobject

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for _typeobject

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Hash for _typeobject

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for _typeobject

source§

fn cmp(&self, other: &_typeobject) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for _typeobject

source§

fn eq(&self, other: &_typeobject) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for _typeobject

source§

fn partial_cmp(&self, other: &_typeobject) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for _typeobject

source§

impl Eq for _typeobject

source§

impl StructuralPartialEq for _typeobject

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.