pub struct PyFunctionSignature {
pub arguments: Vec<Argument>,
has_kw: bool,
has_posonly_args: bool,
has_varargs: bool,
has_kwargs: bool,
}
Expand description
The attributes of the pyfunction macro
Fields
arguments: Vec<Argument>
has_kw: bool
has_posonly_args: bool
has_varargs: bool
has_kwargs: bool
Implementations
sourceimpl PyFunctionSignature
impl PyFunctionSignature
pub fn from_meta<'a>(
iter: impl IntoIterator<Item = &'a NestedMeta>
) -> Result<Self>
pub fn add_item(&mut self, item: &NestedMeta) -> Result<()>
fn add_literal(&mut self, item: &NestedMeta, lit: &Lit) -> Result<()>
fn add_work(&mut self, item: &NestedMeta, path: &Path) -> Result<()>
fn posonly_arg_is_ok(&self, item: &NestedMeta) -> Result<()>
fn vararg_is_ok(&self, item: &NestedMeta) -> Result<()>
fn kw_arg_is_ok(&self, item: &NestedMeta) -> Result<()>
fn add_nv_common(
&mut self,
item: &NestedMeta,
name: &Path,
value: String
) -> Result<()>
fn add_name_value(
&mut self,
item: &NestedMeta,
nv: &MetaNameValue
) -> Result<()>
Trait Implementations
sourceimpl Default for PyFunctionSignature
impl Default for PyFunctionSignature
sourcefn default() -> PyFunctionSignature
fn default() -> PyFunctionSignature
Returns the “default value” for a type. Read more
sourceimpl Parse for PyFunctionSignature
impl Parse for PyFunctionSignature
fn parse(input: &ParseBuffer<'_>) -> Result<Self>
Auto Trait Implementations
impl RefUnwindSafe for PyFunctionSignature
impl !Send for PyFunctionSignature
impl !Sync for PyFunctionSignature
impl Unpin for PyFunctionSignature
impl UnwindSafe for PyFunctionSignature
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more