Struct PyTypeObject
#[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>,
}
Available on crate features
dep_pyo3
and std
only.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>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PyTypeObject
impl RefUnwindSafe for PyTypeObject
impl !Send for PyTypeObject
impl !Sync for PyTypeObject
impl Unpin for PyTypeObject
impl UnwindSafe for PyTypeObject
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> ByteSized for T
impl<T> ByteSized for T
Source§const BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
The alignment of this type in bytes.
Source§fn byte_align(&self) -> usize ⓘ
fn byte_align(&self) -> usize ⓘ
Returns the alignment of this type in bytes.
Source§fn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Source§impl<T, R> Chain<R> for Twhere
T: ?Sized,
impl<T, R> Chain<R> for Twhere
T: ?Sized,
Source§impl<T> ExtAny for T
impl<T> ExtAny for T
Source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Source§impl<T> ExtMem for Twhere
T: ?Sized,
impl<T> ExtMem for Twhere
T: ?Sized,
Source§const NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Know whether dropping values of this type matters, in compile-time.
Source§fn mem_align_of_val(&self) -> usize ⓘ
fn mem_align_of_val(&self) -> usize ⓘ
Returns the alignment of the pointed-to value in bytes. Read more
Source§fn mem_size_of_val(&self) -> usize ⓘ
fn mem_size_of_val(&self) -> usize ⓘ
Returns the size of the pointed-to value in bytes. Read more
Source§fn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
Returns
true
if dropping values of this type matters. Read moreSource§fn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
Forgets about
self
without running its destructor. Read moreSource§fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Source§unsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
Available on crate feature
unsafe_layout
only.Returns the value of type
T
represented by the all-zero byte-pattern. Read moreSource§unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
Available on crate feature
unsafe_layout
only.Returns the value of type
T
represented by the all-zero byte-pattern. Read moreSource§fn mem_as_bytes(&self) -> &[u8] ⓘ
fn mem_as_bytes(&self) -> &[u8] ⓘ
Available on crate feature
unsafe_slice
only.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Hook for T
impl<T> Hook for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError> ⓘ
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError> ⓘ
Returns the layout of the type.
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out
indicating that a T
is niched.