Struct leo_ast::statement::conditional::ConditionalStatement
source · pub struct ConditionalStatement {
pub condition: Expression,
pub then: Block,
pub otherwise: Option<Box<Statement>>,
pub span: Span,
}Expand description
An if condition block (else next)? statement.
Fields§
§condition: ExpressionThe bool-typed condition deciding what to evaluate.
then: BlockThe block to evaluate in case condition yields true.
otherwise: Option<Box<Statement>>The statement, if any, to evaluate when condition yields false.
span: SpanThe span from if to next or to block.
Trait Implementations§
source§impl Clone for ConditionalStatement
impl Clone for ConditionalStatement
source§fn clone(&self) -> ConditionalStatement
fn clone(&self) -> ConditionalStatement
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 ConditionalStatement
impl Debug for ConditionalStatement
source§impl<'de> Deserialize<'de> for ConditionalStatement
impl<'de> Deserialize<'de> for ConditionalStatement
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 ConditionalStatement
impl Display for ConditionalStatement
source§impl Node for ConditionalStatement
impl Node for ConditionalStatement
source§impl PartialEq<ConditionalStatement> for ConditionalStatement
impl PartialEq<ConditionalStatement> for ConditionalStatement
source§fn eq(&self, other: &ConditionalStatement) -> bool
fn eq(&self, other: &ConditionalStatement) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for ConditionalStatement
impl Serialize for ConditionalStatement
impl Eq for ConditionalStatement
impl StructuralEq for ConditionalStatement
impl StructuralPartialEq for ConditionalStatement
Auto Trait Implementations§
impl !RefUnwindSafe for ConditionalStatement
impl Send for ConditionalStatement
impl !Sync for ConditionalStatement
impl Unpin for ConditionalStatement
impl UnwindSafe for ConditionalStatement
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.