pub struct PyFunctionInfo {
pub(crate) name: String,
pub(crate) args: Vec<ArgInfo>,
pub(crate) return: Option<TypeOrOverride>,
pub(crate) sig: Option<Signature>,
pub(crate) doc: String,
pub(crate) module: Option<String>,
pub(crate) is_async: bool,
pub(crate) deprecated: Option<DeprecatedInfo>,
pub(crate) type_ignored: Option<IgnoreTarget>,
}
Fields§
§name: String
§args: Vec<ArgInfo>
§return: Option<TypeOrOverride>
§sig: Option<Signature>
§doc: String
§module: Option<String>
§is_async: bool
§deprecated: Option<DeprecatedInfo>
§type_ignored: Option<IgnoreTarget>
Implementations§
Source§impl PyFunctionInfo
impl PyFunctionInfo
Sourcepub fn parse_attr(&mut self, attr: TokenStream2) -> Result<Option<LitStr>>
pub fn parse_attr(&mut self, attr: TokenStream2) -> Result<Option<LitStr>>
Parse attribute and return python stub string if present
Trait Implementations§
Source§impl ToTokens for PyFunctionInfo
impl ToTokens for PyFunctionInfo
Source§fn to_tokens(&self, tokens: &mut TokenStream2)
fn to_tokens(&self, tokens: &mut TokenStream2)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Source§impl TryFrom<ItemFn> for PyFunctionInfo
impl TryFrom<ItemFn> for PyFunctionInfo
Source§impl TryFrom<PythonFunctionStub> for PyFunctionInfo
impl TryFrom<PythonFunctionStub> for PyFunctionInfo
Auto Trait Implementations§
impl Freeze for PyFunctionInfo
impl RefUnwindSafe for PyFunctionInfo
impl !Send for PyFunctionInfo
impl !Sync for PyFunctionInfo
impl Unpin for PyFunctionInfo
impl UnwindSafe for PyFunctionInfo
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, U> ExactFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> ExactFrom<T> for Uwhere
U: TryFrom<T>,
fn exact_from(value: T) -> U
§impl<T, U> ExactInto<U> for Twhere
U: ExactFrom<T>,
impl<T, U> ExactInto<U> for Twhere
U: ExactFrom<T>,
fn exact_into(self) -> U
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<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
fn overflowing_into(self) -> (U, bool)
§impl<T, U> RoundingInto<U> for Twhere
U: RoundingFrom<T>,
impl<T, U> RoundingInto<U> for Twhere
U: RoundingFrom<T>,
fn rounding_into(self, rm: RoundingMode) -> (U, Ordering)
§impl<T, U> SaturatingInto<U> for Twhere
U: SaturatingFrom<T>,
impl<T, U> SaturatingInto<U> for Twhere
U: SaturatingFrom<T>,
fn saturating_into(self) -> U
Source§impl<T> Spanned for T
impl<T> Spanned for T
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.