pub struct CallArgs<'ast> {
pub span: Span,
pub kind: CallArgsKind<'ast>,
}Expand description
A list of function call arguments.
Fields§
§span: SpanThe span of the arguments. This points to the parenthesized list of arguments.
If the list is empty, this points to the empty ()/({}) or to where the ( would be.
kind: CallArgsKind<'ast>Implementations§
Source§impl<'ast> CallArgs<'ast>
impl<'ast> CallArgs<'ast>
Sourcepub fn empty(span: Span) -> CallArgs<'ast>
pub fn empty(span: Span) -> CallArgs<'ast>
Creates a new empty list of arguments.
span should be an empty span.
Sourcepub fn is_dummy(&self) -> bool
pub fn is_dummy(&self) -> bool
Returns true if the argument list is not present in the source code.
For example, a modifier m can be invoked in a function declaration as m or m(). In the
first case, this returns true, and the span will point to after m. In the second case,
this returns false.
Sourcepub fn exprs(&self) -> impl ExactSizeIterator + DoubleEndedIterator + Clone
pub fn exprs(&self) -> impl ExactSizeIterator + DoubleEndedIterator + Clone
Returns an iterator over the expressions.
Sourcepub fn exprs_mut(&mut self) -> impl ExactSizeIterator + DoubleEndedIterator
pub fn exprs_mut(&mut self) -> impl ExactSizeIterator + DoubleEndedIterator
Returns an iterator over the expressions.
Trait Implementations§
Auto Trait Implementations§
impl<'ast> Freeze for CallArgs<'ast>
impl<'ast> RefUnwindSafe for CallArgs<'ast>
impl<'ast> Send for CallArgs<'ast>
impl<'ast> Sync for CallArgs<'ast>
impl<'ast> Unpin for CallArgs<'ast>
impl<'ast> !UnwindSafe for CallArgs<'ast>
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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more