Struct leo_ast::statement::iteration::IterationStatement
source · pub struct IterationStatement {
pub variable: Identifier,
pub type_: Type,
pub start: Expression,
pub start_value: RefCell<Option<Value>>,
pub stop: Expression,
pub stop_value: RefCell<Option<Value>>,
pub inclusive: bool,
pub block: Block,
pub span: Span,
}Expand description
A bounded for loop statement for variable in start .. =? stop block.
Fields§
§variable: IdentifierThe binding / variable to introduce in the body block.
type_: TypeThe type of the iteration.
start: ExpressionThe start of the iteration.
start_value: RefCell<Option<Value>>The concrete value of start.
stop: ExpressionThe end of the iteration, possibly inclusive.
stop_value: RefCell<Option<Value>>The concrete value of stop.
inclusive: boolWhether stop is inclusive or not.
Signified with = when parsing.
block: BlockThe block to run on each iteration.
span: SpanThe span from for to block.
Trait Implementations§
source§impl Clone for IterationStatement
impl Clone for IterationStatement
source§fn clone(&self) -> IterationStatement
fn clone(&self) -> IterationStatement
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for IterationStatement
impl Debug for IterationStatement
source§impl<'de> Deserialize<'de> for IterationStatement
impl<'de> Deserialize<'de> for IterationStatement
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for IterationStatement
impl Display for IterationStatement
source§impl Node for IterationStatement
impl Node for IterationStatement
source§impl PartialEq<IterationStatement> for IterationStatement
impl PartialEq<IterationStatement> for IterationStatement
source§fn eq(&self, other: &IterationStatement) -> bool
fn eq(&self, other: &IterationStatement) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for IterationStatement
impl Serialize for IterationStatement
impl Eq for IterationStatement
impl StructuralEq for IterationStatement
impl StructuralPartialEq for IterationStatement
Auto Trait Implementations§
impl !RefUnwindSafe for IterationStatement
impl Send for IterationStatement
impl !Sync for IterationStatement
impl Unpin for IterationStatement
impl UnwindSafe for IterationStatement
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.