pub(super) struct Args<'a> {
callee: String,
declared: Option<&'static [Param]>,
positional: Vec<&'a Expr>,
positional_taken: usize,
named: Vec<(&'a str, &'a Expr, Span, bool)>,
}Fields§
§callee: String§declared: Option<&'static [Param]>A built-in’s parameters from its table, which every name the checker asks for must be in, so tools reading the table see the same arguments.
positional: Vec<&'a Expr>§positional_taken: usize§named: Vec<(&'a str, &'a Expr, Span, bool)>Implementations§
Source§impl<'a> Args<'a>
impl<'a> Args<'a>
Sourcepub(super) fn new(
checker: &mut Checker,
callee: String,
args: &'a [Arg],
) -> Self
pub(super) fn new( checker: &mut Checker, callee: String, args: &'a [Arg], ) -> Self
callee names what is called in error messages, such as “label”.
Sourcepub(super) fn built_in(
checker: &mut Checker,
name: &str,
params: &'static [Param],
args: &'a [Arg],
) -> Self
pub(super) fn built_in( checker: &mut Checker, name: &str, params: &'static [Param], args: &'a [Arg], ) -> Self
Arguments to the built-in name, whose table entry declares params.
Sourcepub(super) fn positional(&mut self) -> Option<&'a Expr>
pub(super) fn positional(&mut self) -> Option<&'a Expr>
The next positional argument, if one was given.
pub(super) fn named(&mut self, name: &str) -> Option<&'a Expr>
Auto Trait Implementations§
impl<'a> Freeze for Args<'a>
impl<'a> RefUnwindSafe for Args<'a>
impl<'a> Send for Args<'a>
impl<'a> Sync for Args<'a>
impl<'a> Unpin for Args<'a>
impl<'a> UnsafeUnpin for Args<'a>
impl<'a> UnwindSafe for Args<'a>
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