pub struct AwaitChecker {
pub(crate) to_await: Vec<ConditionalTreeNode>,
pub(crate) static_to_await: IndexSet<Symbol>,
pub(crate) enabled: bool,
pub(crate) max_depth: usize,
}
Fields§
§to_await: Vec<ConditionalTreeNode>
All possible subsets of futures that must be awaited.
static_to_await: IndexSet<Symbol>
Statically updated set of futures to await.
enabled: bool
Whether or not to do full tree search for await checking.
max_depth: usize
Maximum nesting depth to search for await checking.
Implementations§
Source§impl AwaitChecker
impl AwaitChecker
Sourcepub fn remove(&mut self, id: &Identifier) -> bool
pub fn remove(&mut self, id: &Identifier) -> bool
Remove from list.
Returns true
if there was a path where the future was not awaited in the order of the input list.
Sourcepub fn set_futures(&mut self, futures: IndexSet<Symbol>)
pub fn set_futures(&mut self, futures: IndexSet<Symbol>)
Initialize futures.
Sourcepub fn create_then_scope(
&mut self,
is_finalize: bool,
input: Span,
) -> Result<Vec<ConditionalTreeNode>, StaticAnalyzerWarning>
pub fn create_then_scope( &mut self, is_finalize: bool, input: Span, ) -> Result<Vec<ConditionalTreeNode>, StaticAnalyzerWarning>
Enter scope for then
branch of conditional.
Sourcepub fn exit_then_scope(
&mut self,
is_finalize: bool,
parent_nodes: Vec<ConditionalTreeNode>,
) -> Vec<ConditionalTreeNode>
pub fn exit_then_scope( &mut self, is_finalize: bool, parent_nodes: Vec<ConditionalTreeNode>, ) -> Vec<ConditionalTreeNode>
Exit scope for then
branch of conditional.
Sourcepub fn exit_statement_scope(
&mut self,
is_finalize: bool,
then_nodes: Vec<ConditionalTreeNode>,
)
pub fn exit_statement_scope( &mut self, is_finalize: bool, then_nodes: Vec<ConditionalTreeNode>, )
Exit scope for conditional statement at current depth.
Auto Trait Implementations§
impl Freeze for AwaitChecker
impl RefUnwindSafe for AwaitChecker
impl Send for AwaitChecker
impl Sync for AwaitChecker
impl Unpin for AwaitChecker
impl UnwindSafe for AwaitChecker
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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