pub enum Element {
Statement(Statement),
Expression(Expression),
Block {
block: Block,
function_body: bool,
},
AleoExecution {
context: Box<AleoContext>,
registers: IndexMap<u64, Value>,
instruction_index: usize,
},
DelayedCall(GlobalId),
}
Expand description
A Leo construct to be evauated.
Variants§
Statement(Statement)
A Leo statement.
Expression(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 Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
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