Struct PyFunctionObject
#[repr(C)]pub struct PyFunctionObject {Show 18 fields
pub ob_base: PyObject,
pub func_globals: *mut PyObject,
pub func_builtins: *mut PyObject,
pub func_name: *mut PyObject,
pub func_qualname: *mut PyObject,
pub func_code: *mut PyObject,
pub func_defaults: *mut PyObject,
pub func_kwdefaults: *mut PyObject,
pub func_closure: *mut PyObject,
pub func_doc: *mut PyObject,
pub func_dict: *mut PyObject,
pub func_weakreflist: *mut PyObject,
pub func_module: *mut PyObject,
pub func_annotations: *mut PyObject,
pub func_annotate: *mut PyObject,
pub func_typeparams: *mut PyObject,
pub vectorcall: Option<unsafe extern "C" fn(*mut PyObject, *const *mut PyObject, usize, *mut PyObject) -> *mut PyObject>,
pub func_version: u32,
}Available on neither
PyPy nor GraalPy and Py_3_10 and crate feature tls only.Fields§
§ob_base: PyObject§func_globals: *mut PyObject§func_builtins: *mut PyObject§func_name: *mut PyObject§func_qualname: *mut PyObject§func_code: *mut PyObject§func_defaults: *mut PyObject§func_kwdefaults: *mut PyObject§func_closure: *mut PyObject§func_doc: *mut PyObject§func_dict: *mut PyObject§func_weakreflist: *mut PyObject§func_module: *mut PyObject§func_annotations: *mut PyObject§func_annotate: *mut PyObjectAvailable on
§Py_3_14 only.func_typeparams: *mut PyObjectAvailable on
§Py_3_12 only.vectorcall: Option<unsafe extern "C" fn(*mut PyObject, *const *mut PyObject, usize, *mut PyObject) -> *mut PyObject>§func_version: u32Available on
Py_3_11 only.Auto Trait Implementations§
impl Freeze for PyFunctionObject
impl RefUnwindSafe for PyFunctionObject
impl !Send for PyFunctionObject
impl !Sync for PyFunctionObject
impl Unpin for PyFunctionObject
impl UnsafeUnpin for PyFunctionObject
impl UnwindSafe for PyFunctionObject
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
§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