pub enum ParseState {
Positional,
PositionalAfterPosargs,
Keywords,
Done,
}
Variants§
Positional
Accepting positional parameters, which might be positional only
PositionalAfterPosargs
Accepting positional parameters after ‘/’
Keywords
Accepting keyword-only parameters after ‘*’ or ‘*args’
Done
After **kwargs
nothing is allowed
Implementations§
Source§impl ParseState
impl ParseState
fn add_argument( &mut self, signature: &mut PythonSignature, name: String, required: bool, span: Span, ) -> Result<()>
fn add_varargs( &mut self, signature: &mut PythonSignature, varargs: &SignatureItemVarargs, ) -> Result<()>
fn add_kwargs( &mut self, signature: &mut PythonSignature, kwargs: &SignatureItemKwargs, ) -> Result<()>
fn finish_pos_only_args( &mut self, signature: &mut PythonSignature, span: Span, ) -> Result<()>
fn finish_pos_args( &mut self, signature: &PythonSignature, span: Span, ) -> Result<()>
Auto Trait Implementations§
impl Freeze for ParseState
impl RefUnwindSafe for ParseState
impl Send for ParseState
impl Sync for ParseState
impl Unpin for ParseState
impl UnwindSafe for ParseState
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