Struct erg_compiler::hir::Args
source · [−]pub struct Args {
pub pos_args: Vec<PosArg>,
pub var_args: Option<Box<PosArg>>,
pub kw_args: Vec<KwArg>,
/* private fields */
}
Fields
pos_args: Vec<PosArg>
var_args: Option<Box<PosArg>>
kw_args: Vec<KwArg>
Implementations
sourceimpl Args
impl Args
pub fn new(
pos_args: Vec<PosArg>,
var_args: Option<PosArg>,
kw_args: Vec<KwArg>,
paren: Option<(Token, Token)>
) -> Self
pub fn empty() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn kw_len(&self) -> usize
pub fn push_pos(&mut self, pos: PosArg)
pub fn push_kw(&mut self, kw: KwArg)
pub fn remove(&mut self, index: usize) -> Expr
sourcepub fn try_remove(&mut self, index: usize) -> Option<Expr>
pub fn try_remove(&mut self, index: usize) -> Option<Expr>
try_remove((1, 2, z: 3), 2) == Some(3)
pub fn try_remove_pos(&mut self, index: usize) -> Option<PosArg>
pub fn try_remove_kw(&mut self, index: usize) -> Option<KwArg>
pub fn get(&self, index: usize) -> Option<&Expr>
pub fn remove_left_or_key(&mut self, key: &str) -> Option<Expr>
pub fn get_left_or_key(&self, key: &str) -> Option<&Expr>
pub fn insert_pos(&mut self, idx: usize, pos: PosArg)
Trait Implementations
sourceimpl Locational for Args
impl Locational for Args
Auto Trait Implementations
impl !RefUnwindSafe for Args
impl !Send for Args
impl !Sync for Args
impl Unpin for Args
impl !UnwindSafe for Args
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more