pub enum ExternalCalls {
All,
NonStd,
None,
}Expand description
Which calls to external code are kept in flows.
Variants§
All
Keep every external call, including std and unresolved method calls
(sym:? name). Verbose; useful for debugging the language adapter.
NonStd
Keep calls into non-std dependencies (tokio::spawn,
serde_json::to_string); drop std/core/alloc and unresolved
method calls. The default.
None
Keep only calls into the analysed code.
Implementations§
Source§impl ExternalCalls
impl ExternalCalls
Sourcepub fn keeps(
self,
confidence: Confidence,
is_dependency: impl FnOnce() -> bool,
) -> bool
pub fn keeps( self, confidence: Confidence, is_dependency: impl FnOnce() -> bool, ) -> bool
Whether a call resolved with confidence stays in the flow. Exact and
inferred calls always stay; an external call stays under
ExternalCalls::NonStd only if is_dependency says its target is a
real dependency (not the standard library, not an unresolved name).
is_dependency is only evaluated when needed.
Trait Implementations§
Source§impl Clone for ExternalCalls
impl Clone for ExternalCalls
Source§fn clone(&self) -> ExternalCalls
fn clone(&self) -> ExternalCalls
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExternalCalls
Source§impl Debug for ExternalCalls
impl Debug for ExternalCalls
Source§impl Default for ExternalCalls
impl Default for ExternalCalls
Source§fn default() -> ExternalCalls
fn default() -> ExternalCalls
Returns the “default value” for a type. Read more
impl Eq for ExternalCalls
Source§impl PartialEq for ExternalCalls
impl PartialEq for ExternalCalls
impl StructuralPartialEq for ExternalCalls
Auto Trait Implementations§
impl Freeze for ExternalCalls
impl RefUnwindSafe for ExternalCalls
impl Send for ExternalCalls
impl Sync for ExternalCalls
impl Unpin for ExternalCalls
impl UnsafeUnpin for ExternalCalls
impl UnwindSafe for ExternalCalls
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<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
Compare self to
key and return true if they are equal.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