Struct pyo3::ffi::PyTypeObject

source ·
#[repr(C)]
pub struct PyTypeObject {
Show 50 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_print: Option<unsafe extern "C" fn(_: *mut PyObject, _: *mut FILE, _: i32) -> i32>,
}

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: u64§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_print: Option<unsafe extern "C" fn(_: *mut PyObject, _: *mut FILE, _: i32) -> i32>

Trait Implementations§

source§

impl Clone for PyTypeObject

source§

fn clone(&self) -> PyTypeObject

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 PyTypeObject

source§

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

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

impl Copy for PyTypeObject

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> 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> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
source§

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

§

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>,

§

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>,

§

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.