pub struct Parameters {
    pub positional_only: Vec<Parameter>,
    pub positional_or_keyword: Vec<Parameter>,
    pub keyword_only: Vec<Parameter>,
    pub varargs: Option<Parameter>,
    pub varkw: Option<Parameter>,
}Expand description
Container for parameters in a Python function/method signature
This struct organizes parameters into sections according to Python’s signature syntax,
ensuring proper ordering and placement of delimiters (/ and *).
Fields§
§positional_only: Vec<Parameter>Positional-only parameters (before /)
positional_or_keyword: Vec<Parameter>Positional or keyword parameters
keyword_only: Vec<Parameter>Keyword-only parameters (after *)
varargs: Option<Parameter>Variable positional parameter (*args)
varkw: Option<Parameter>Variable keyword parameter (**kwargs)
Implementations§
Source§impl Parameters
 
impl Parameters
Sourcepub fn from_infos(infos: &[ParameterInfo]) -> Self
 
pub fn from_infos(infos: &[ParameterInfo]) -> Self
Build Parameters from a slice of ParameterInfo
Sourcepub fn iter_entries(&self) -> impl Iterator<Item = &Parameter>
 
pub fn iter_entries(&self) -> impl Iterator<Item = &Parameter>
Iterate over all parameters in signature order
Trait Implementations§
Source§impl Clone for Parameters
 
impl Clone for Parameters
Source§fn clone(&self) -> Parameters
 
fn clone(&self) -> Parameters
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 Parameters
 
impl Debug for Parameters
Source§impl Default for Parameters
 
impl Default for Parameters
Source§impl Display for Parameters
 
impl Display for Parameters
Source§impl PartialEq for Parameters
 
impl PartialEq for Parameters
impl StructuralPartialEq for Parameters
Auto Trait Implementations§
impl Freeze for Parameters
impl RefUnwindSafe for Parameters
impl Send for Parameters
impl Sync for Parameters
impl Unpin for Parameters
impl UnwindSafe for Parameters
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