Struct cairo_lang_semantic::expr::objects::ExprBlock
source · pub struct ExprBlock {
pub statements: Vec<StatementId>,
pub tail: Option<ExprId>,
pub ty: TypeId,
pub stable_ptr: ExprPtr,
}
Fields§
§statements: Vec<StatementId>
§tail: Option<ExprId>
Blocks may end with an expression, without a trailing ;
.
In this case, tail
will be Some(expr) with that expression.
The block expression will evaluate to this tail expression.
Otherwise, this will be None.
ty: TypeId
§stable_ptr: ExprPtr
Trait Implementations§
source§impl<'a, T: ?Sized + Upcast<ExprFormatter<'a>>> DebugWithDb<T> for ExprBlock
impl<'a, T: ?Sized + Upcast<ExprFormatter<'a>>> DebugWithDb<T> for ExprBlock
source§impl PartialEq for ExprBlock
impl PartialEq for ExprBlock
source§impl<T: SemanticRewriter<Vec<StatementId>, Error> + SemanticRewriter<Option<ExprId>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprBlock
impl<T: SemanticRewriter<Vec<StatementId>, Error> + SemanticRewriter<Option<ExprId>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprBlock
fn default_rewrite(self, rewriter: &mut T) -> Result<Self, Error>
impl Eq for ExprBlock
impl StructuralEq for ExprBlock
impl StructuralPartialEq for ExprBlock
Auto Trait Implementations§
impl RefUnwindSafe for ExprBlock
impl Send for ExprBlock
impl Sync for ExprBlock
impl Unpin for ExprBlock
impl UnwindSafe for ExprBlock
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 Q
impl<Q, K> Equivalent<K> for Q
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 Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.