pub struct ScopeState {
pub(crate) function: Option<Symbol>,
pub(crate) variant: Option<Variant>,
pub(crate) has_return: bool,
pub(crate) program_name: Option<Symbol>,
pub(crate) module_name: Vec<Symbol>,
pub(crate) is_stub: bool,
pub(crate) futures: IndexMap<Symbol, Location>,
pub(crate) has_called_finalize: bool,
pub(crate) already_contains_an_async_block: bool,
pub(crate) is_conditional: bool,
pub(crate) call_location: Option<Location>,
pub(crate) is_constructor: bool,
}
Fields§
§function: Option<Symbol>
The name of the function that we are currently traversing.
variant: Option<Variant>
The variant of the function that we are currently traversing.
has_return: bool
Whether or not the function that we are currently traversing has a return statement.
program_name: Option<Symbol>
Current program name.
module_name: Vec<Symbol>
Current module name.
is_stub: bool
Whether or not we are currently traversing a stub.
futures: IndexMap<Symbol, Location>
The futures that must be propagated to an async function. We only expect futures in the top level program scope at this stage so just refer to them by their names.
has_called_finalize: bool
Whether the finalize caller has called the finalize function.
already_contains_an_async_block: bool
Whether this function already contains an async
block.
is_conditional: bool
Whether we are currently traversing a conditional statement.
call_location: Option<Location>
Location of most recent external call that produced a future.
is_constructor: bool
Whether we are currently traversing a constructor.
Implementations§
Auto Trait Implementations§
impl Freeze for ScopeState
impl RefUnwindSafe for ScopeState
impl Send for ScopeState
impl Sync for ScopeState
impl Unpin for ScopeState
impl UnwindSafe for ScopeState
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