pub struct CallArgs<'hir> {
pub span: Span,
pub kind: CallArgsKind<'hir>,
}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<'hir>Implementations§
Source§impl<'hir> CallArgs<'hir>
impl<'hir> CallArgs<'hir>
Sourcepub fn empty(span: Span) -> CallArgs<'hir>
pub fn empty(span: Span) -> CallArgs<'hir>
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.
Trait Implementations§
impl<'hir> Copy for CallArgs<'hir>
Auto Trait Implementations§
impl<'hir> Freeze for CallArgs<'hir>
impl<'hir> RefUnwindSafe for CallArgs<'hir>
impl<'hir> Send for CallArgs<'hir>
impl<'hir> Sync for CallArgs<'hir>
impl<'hir> Unpin for CallArgs<'hir>
impl<'hir> UnwindSafe for CallArgs<'hir>
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§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