Struct leo_passes::type_checking::scope_state::ScopeState
source · pub struct ScopeState {
pub(crate) function: Option<Symbol>,
pub(crate) variant: Option<Variant>,
pub(crate) has_return: bool,
pub(crate) is_return: bool,
pub(crate) program_name: Option<Symbol>,
pub(crate) is_stub: bool,
pub(crate) futures: IndexMap<Symbol, Location>,
pub(crate) has_called_finalize: bool,
pub(crate) is_conditional: bool,
pub(crate) is_call: bool,
pub(crate) call_location: Option<Location>,
}
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.
is_return: bool
Whether or not we are currently traversing a return statement.
program_name: Option<Symbol>
Current program 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.
has_called_finalize: bool
Whether the finalize caller has called the finalize function.
is_conditional: bool
Whether currently traversing a conditional statement.
is_call: bool
Whether the current function is a call.
call_location: Option<Location>
Location of most recent external call that produced a future.
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