pub struct FunctionContractFacts {
pub declarations: Vec<FunctionContract>,
pub calls: Vec<FunctionCalls>,
pub escapes: Vec<LocalFunctionEscape>,
pub template_callers: bool,
pub direct_eval: bool,
pub opaque_loads: OpaqueLoads,
pub literal_consts: Vec<Box<str>>,
}Expand description
Call evidence of one module.
Fields§
§declarations: Vec<FunctionContract>One contract for each function that a module-scope binding holds.
calls: Vec<FunctionCalls>Direct calls whose callee is an admitted import binding or a local function binding, one entry per callee, ordered by the first site.
escapes: Vec<LocalFunctionEscape>References to a local function binding that are not a direct callee, in source order.
template_callers: booltrue for a Vue, Svelte, Astro, Glimmer or MDX host. A template, an
inline script, or another script block of the file can call a binding,
and the facts do not hold those calls. A consumer must treat each
contract of the file, and each import that the file calls, as open.
direct_eval: booltrue when the module calls eval directly, at any depth. A direct
eval can call each binding in scope with any value, so a consumer
must treat each contract of the module, and each import that the
module calls, as open. A contract whose own body or default values
call eval also has ContractIncomplete::DirectEval.
opaque_loads: OpaqueLoadsThe uses of each import() or require call whose source gives no
file and no pattern, such as import(name). Such a call can load each
module of the project.
literal_consts: Vec<Box<str>>The local names of the exported module-scope const bindings whose
initializer is a literal, in source order. A call argument that names
one of these bindings through an import has a known identity.
Implementations§
Source§impl FunctionContractFacts
impl FunctionContractFacts
Sourcepub fn call_sites(&self) -> impl Iterator<Item = (CallTarget, &str, &CallSite)>
pub fn call_sites(&self) -> impl Iterator<Item = (CallTarget, &str, &CallSite)>
Each call site with its callee, ordered by callee and then by site.
Trait Implementations§
Source§impl Clone for FunctionContractFacts
impl Clone for FunctionContractFacts
Source§impl Debug for FunctionContractFacts
impl Debug for FunctionContractFacts
impl<'__de> Decode<'__de> for FunctionContractFactswhere
'__de:,
Source§impl Default for FunctionContractFacts
impl Default for FunctionContractFacts
impl Encode for FunctionContractFacts
impl Eq for FunctionContractFacts
Source§impl PartialEq for FunctionContractFacts
impl PartialEq for FunctionContractFacts
impl StructuralPartialEq for FunctionContractFacts
Auto Trait Implementations§
impl Forget for FunctionContractFacts
impl Freeze for FunctionContractFacts
impl Move for FunctionContractFacts
impl RefUnwindSafe for FunctionContractFacts
impl Send for FunctionContractFacts
impl Sync for FunctionContractFacts
impl Unpin for FunctionContractFacts
impl UnsafeUnpin for FunctionContractFacts
impl UnwindSafe for FunctionContractFacts
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.