Struct erg_parser::ast::ConstArgs
source · pub struct ConstArgs {
pub pos_args: Vec<ConstPosArg>,
pub var_args: Option<Box<ConstPosArg>>,
pub kw_args: Vec<ConstKwArg>,
pub kw_var: Option<Box<ConstPosArg>>,
/* private fields */
}
Fields§
§pos_args: Vec<ConstPosArg>
§var_args: Option<Box<ConstPosArg>>
§kw_args: Vec<ConstKwArg>
§kw_var: Option<Box<ConstPosArg>>
Implementations§
source§impl ConstArgs
impl ConstArgs
pub fn new( pos_args: Vec<ConstPosArg>, var_args: Option<ConstPosArg>, kw_args: Vec<ConstKwArg>, kw_var: Option<ConstPosArg>, paren: Option<(Token, Token)>, ) -> Self
pub fn pos_only( pos_args: Vec<ConstPosArg>, paren: Option<(Token, Token)>, ) -> Self
pub fn single(expr: ConstExpr) -> Self
pub fn empty() -> Self
pub fn is_empty(&self) -> bool
pub fn push_pos(&mut self, arg: ConstPosArg)
pub fn push_kw(&mut self, arg: ConstKwArg)
source§impl ConstArgs
impl ConstArgs
pub fn deconstruct( self, ) -> (Vec<ConstPosArg>, Option<ConstPosArg>, Vec<ConstKwArg>, Option<ConstPosArg>, Option<(Token, Token)>)
pub fn pos_args(&self) -> impl Iterator<Item = &ConstPosArg>
pub fn kw_args(&self) -> impl Iterator<Item = &ConstKwArg>
pub fn into_iters( self, ) -> (impl IntoIterator<Item = ConstPosArg>, impl IntoIterator<Item = ConstKwArg>)
pub fn downgrade(self) -> Args
Trait Implementations§
source§impl Locational for ConstArgs
impl Locational for ConstArgs
source§impl NestedDisplay for ConstArgs
impl NestedDisplay for ConstArgs
impl Eq for ConstArgs
impl StructuralPartialEq for ConstArgs
Auto Trait Implementations§
impl Freeze for ConstArgs
impl RefUnwindSafe for ConstArgs
impl Send for ConstArgs
impl Sync for ConstArgs
impl Unpin for ConstArgs
impl UnwindSafe for ConstArgs
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)