Struct python_ast::tree::parameters::ParameterList
source · pub struct ParameterList {
pub posonlyargs: Vec<Parameter>,
pub args: Vec<Parameter>,
pub vararg: Option<Parameter>,
pub kwonlyargs: Vec<Parameter>,
pub kw_defaults: Vec<Arg>,
pub kwarg: Option<Parameter>,
pub defaults: Vec<Arg>,
}
Expand description
The parameter list of a function.
Fields§
§posonlyargs: Vec<Parameter>
§args: Vec<Parameter>
§vararg: Option<Parameter>
§kwonlyargs: Vec<Parameter>
§kw_defaults: Vec<Arg>
§kwarg: Option<Parameter>
§defaults: Vec<Arg>
Trait Implementations§
source§impl Clone for ParameterList
impl Clone for ParameterList
source§fn clone(&self) -> ParameterList
fn clone(&self) -> ParameterList
Returns a copy 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<'a> CodeGen for ParameterList
impl<'a> CodeGen for ParameterList
§type Context = CodeGenContext
type Context = CodeGenContext
A type, generally an enum, that passes the code generator the context of the node.
§type Options = PythonOptions
type Options = PythonOptions
A struct representing the set of compilation options.
source§fn to_rust(
self,
ctx: Self::Context,
options: Self::Options
) -> Result<TokenStream, Box<dyn Error>>
fn to_rust( self, ctx: Self::Context, options: Self::Options ) -> Result<TokenStream, Box<dyn Error>>
A trait method to output Rust code in a general sense. The output should be stream of Rust tokens,
however, it is not guaranteed that it will fully compile because of scoping errors and other checks
that don’t occur until later.
source§fn get_docstring(&self) -> Option<String>
fn get_docstring(&self) -> Option<String>
A trait method for extracting a docstring from an object that can have a docstring.
source§impl Debug for ParameterList
impl Debug for ParameterList
source§impl Default for ParameterList
impl Default for ParameterList
source§fn default() -> ParameterList
fn default() -> ParameterList
Returns the “default value” for a type. Read more
source§impl<'source> FromPyObject<'source> for ParameterList
impl<'source> FromPyObject<'source> for ParameterList
Auto Trait Implementations§
impl RefUnwindSafe for ParameterList
impl Send for ParameterList
impl Sync for ParameterList
impl Unpin for ParameterList
impl UnwindSafe for ParameterList
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