pub struct PythonParam {
pub name: String,
pub annotation: Option<PythonType>,
pub default: Option<PythonExpr>,
pub is_vararg: bool,
pub is_kwarg: bool,
pub is_keyword_only: bool,
}Expand description
Python function parameter with optional type annotation and default.
Fields§
§name: StringParameter name
annotation: Option<PythonType>Optional type annotation
default: Option<PythonExpr>Optional default value
is_vararg: boolWhether this is a *args parameter
is_kwarg: boolWhether this is a **kwargs parameter
is_keyword_only: boolWhether this is a keyword-only parameter (after *)
Implementations§
Trait Implementations§
Source§impl Clone for PythonParam
impl Clone for PythonParam
Source§fn clone(&self) -> PythonParam
fn clone(&self) -> PythonParam
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 PythonParam
impl Debug for PythonParam
Source§impl Display for PythonParam
impl Display for PythonParam
Source§impl PartialEq for PythonParam
impl PartialEq for PythonParam
impl StructuralPartialEq for PythonParam
Auto Trait Implementations§
impl Freeze for PythonParam
impl RefUnwindSafe for PythonParam
impl Send for PythonParam
impl Sync for PythonParam
impl Unpin for PythonParam
impl UnsafeUnpin for PythonParam
impl UnwindSafe for PythonParam
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