pub struct CallSite {
pub arg_count: u32,
pub args: Vec<ArgFact>,
pub spread_from: Option<u32>,
pub result_used: bool,
pub span_start: u32,
}Expand description
One direct call of a FunctionCalls callee.
Fields§
§arg_count: u32The count of arguments, spread arguments included.
args: Vec<ArgFact>One fact for each argument before the first spread, to a fixed
maximum. A string literal longer than a fixed maximum is
ArgFact::Unknown. A spread moves each later argument to an
unknown parameter, so no fact is kept from the spread on. Empty when
each kept argument is ArgFact::Unknown, so arg_count then holds
the shape.
Do not index this list directly. Use CallSite::arg_at, which
gives one of three outcomes for a parameter position: a known fact,
an unknown value, or an omitted argument.
spread_from: Option<u32>The index of the first spread argument.
result_used: boolfalse when the call, with or without await or void, is a whole
expression statement.
span_start: u32Start byte of the call expression.
Implementations§
Source§impl CallSite
impl CallSite
Sourcepub fn arg_at(&self, index: u32) -> ArgAt<'_>
pub fn arg_at(&self, index: u32) -> ArgAt<'_>
The argument that this call passes at parameter position index.
- From the first spread on, each position is
ArgAt::Unknown, because a spread can fill any later position. - A position at or past
arg_countisArgAt::Omitted. - A position with a stored fact other than
ArgFact::UnknownisArgAt::Fact. - Each other position is
ArgAt::Unknown: a stored unknown fact, a position past the kept facts, or a call with an emptyargs.
Trait Implementations§
impl<'__de> Decode<'__de> for CallSitewhere
'__de:,
impl Encode for CallSite
impl Eq for CallSite
impl StructuralPartialEq for CallSite
Auto Trait Implementations§
impl Forget for CallSite
impl Freeze for CallSite
impl Move for CallSite
impl RefUnwindSafe for CallSite
impl Send for CallSite
impl Sync for CallSite
impl Unpin for CallSite
impl UnsafeUnpin for CallSite
impl UnwindSafe for CallSite
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DecodeOwned for Twhere
T: for<'de> Decode<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.