pub struct FunctionDef {
pub name: &'static str,
pub parameters: Parameters,
pub return: TypeInfo,
pub doc: &'static str,
pub is_async: bool,
pub deprecated: Option<DeprecatedInfo>,
pub type_ignored: Option<IgnoreTarget>,
pub is_overload: bool,
pub file: &'static str,
pub line: u32,
pub column: u32,
pub index: usize,
}Expand description
Definition of a Python function.
Fields§
§name: &'static str§parameters: Parameters§return: TypeInfo§doc: &'static str§is_async: bool§deprecated: Option<DeprecatedInfo>§type_ignored: Option<IgnoreTarget>§is_overload: bool§file: &'static strSource file location for deterministic ordering
line: u32§column: u32§index: usizeIndex for ordering multiple functions from the same macro invocation
Trait Implementations§
Source§impl Clone for FunctionDef
impl Clone for FunctionDef
Source§fn clone(&self) -> FunctionDef
fn clone(&self) -> FunctionDef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FunctionDef
impl Debug for FunctionDef
Source§impl Display for FunctionDef
impl Display for FunctionDef
Source§impl From<&PyFunctionInfo> for FunctionDef
impl From<&PyFunctionInfo> for FunctionDef
Source§fn from(info: &PyFunctionInfo) -> Self
fn from(info: &PyFunctionInfo) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FunctionDef
impl PartialEq for FunctionDef
impl StructuralPartialEq for FunctionDef
Auto Trait Implementations§
impl Freeze for FunctionDef
impl RefUnwindSafe for FunctionDef
impl Send for FunctionDef
impl Sync for FunctionDef
impl Unpin for FunctionDef
impl UnwindSafe for FunctionDef
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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