pub enum Element<'a> {
Statement(&'a Statement),
Expression(&'a Expression),
Block {
block: &'a Block,
function_body: bool,
},
AleoExecution {
context: AleoContext<'a>,
registers: IndexMap<u64, Value>,
instruction_index: usize,
},
DelayedCall(GlobalId),
}
Expand description
A Leo construct to be evauated.
Variants§
Statement(&'a Statement)
A Leo statement.
Expression(&'a Expression)
A Leo expression.
Block
A Leo block.
We have a separate variant for Leo blocks for two reasons:
- In a ConditionalExpression, the
then
block is stored as just a Block with no statement, and - We need to remember if a Block came from a function body,
so that if such a block ends, we know to push a
Unit
to the values stack.
AleoExecution
DelayedCall(GlobalId)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Element<'a>
impl<'a> !RefUnwindSafe for Element<'a>
impl<'a> !Send for Element<'a>
impl<'a> !Sync for Element<'a>
impl<'a> Unpin for Element<'a>
impl<'a> !UnwindSafe for Element<'a>
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,
§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