Struct erg_compiler::hir::Args
source · [−]pub struct Args { /* private fields */ }
Implementations
sourceimpl Args
impl Args
pub const fn new(
pos_args: Vec<PosArg>,
kw_args: Vec<KwArg>,
paren: Option<(Token, Token)>
) -> Self
pub const fn empty() -> Self
pub fn len(&self) -> usize
pub fn kw_len(&self) -> usize
pub fn pos_args(&self) -> &[PosArg]
pub fn kw_args(&self) -> &[KwArg]
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>
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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