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) -> Self
pub fn empty(span: Span) -> Self
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<Item = &Expr<'ast>> + DoubleEndedIterator + Clone
pub fn exprs( &self, ) -> impl ExactSizeIterator<Item = &Expr<'ast>> + DoubleEndedIterator + Clone
Returns an iterator over the expressions.
Sourcepub fn exprs_mut(
&mut self,
) -> impl ExactSizeIterator<Item = &mut Box<'ast, Expr<'ast>>> + DoubleEndedIterator
pub fn exprs_mut( &mut self, ) -> impl ExactSizeIterator<Item = &mut Box<'ast, Expr<'ast>>> + 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
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes